git: d2dab20c2ade - main - ktls: Drop all the INET and INET6 compile-time guards.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 23 Mar 2023 21:29:29 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=d2dab20c2ade644337430856248ccb54a0a543c4
commit d2dab20c2ade644337430856248ccb54a0a543c4
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-03-23 21:29:07 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-03-23 21:29:07 +0000
ktls: Drop all the INET and INET6 compile-time guards.
Consistent with 9fd0d9b16e93ff2a3bd375a98763dca0150dcee0, KERN_TLS is
not supported on kernels without any INET support.
Reviewed by: gallatin, hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39232
---
sys/kern/uipc_ktls.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c
index c82864f379b8..4639355b1558 100644
--- a/sys/kern/uipc_ktls.c
+++ b/sys/kern/uipc_ktls.c
@@ -66,10 +66,8 @@ __FBSDID("$FreeBSD$");
#endif
#include <net/route.h>
#include <net/route/nhop.h>
-#if defined(INET) || defined(INET6)
#include <netinet/in.h>
#include <netinet/in_pcb.h>
-#endif
#include <netinet/tcp_var.h>
#ifdef TCP_OFFLOAD
#include <netinet/tcp_offload.h>
@@ -302,14 +300,11 @@ SYSCTL_COUNTER_U64(_kern_ipc_tls_toe, OID_AUTO, chacha20, CTLFLAG_RD,
static MALLOC_DEFINE(M_KTLS, "ktls", "Kernel TLS");
-#if defined(INET) || defined(INET6)
static void ktls_reset_receive_tag(void *context, int pending);
static void ktls_reset_send_tag(void *context, int pending);
-#endif
static void ktls_work_thread(void *ctx);
static void ktls_alloc_thread(void *ctx);
-#if defined(INET) || defined(INET6)
static u_int
ktls_get_cpu(struct socket *so)
{
@@ -340,7 +335,6 @@ ktls_get_cpu(struct socket *so)
cpuid = ktls_cpuid_lookup[inp->inp_flowid % ktls_number_threads];
return (cpuid);
}
-#endif
static int
ktls_buffer_import(void *arg, void **store, int count, int domain, int flags)
@@ -505,7 +499,6 @@ start:
return (error);
}
-#if defined(INET) || defined(INET6)
static int
ktls_create_session(struct socket *so, struct tls_enable *en,
struct ktls_session **tlsp, int direction)
@@ -1826,7 +1819,6 @@ ktls_modify_txrtlmt(struct ktls_session *tls, uint64_t max_pacing_rate)
return (mst->sw->snd_tag_modify(mst, ¶ms));
}
#endif
-#endif
static void
ktls_destroy_help(void *context, int pending __unused)
@@ -3265,7 +3257,6 @@ ktls_work_thread(void *ctx)
}
}
-#if defined(INET) || defined(INET6)
static void
ktls_disable_ifnet_help(void *context, int pending __unused)
{
@@ -3354,4 +3345,3 @@ ktls_disable_ifnet(void *arg)
TASK_INIT(&tls->disable_ifnet_task, 0, ktls_disable_ifnet_help, tls);
(void)taskqueue_enqueue(taskqueue_thread, &tls->disable_ifnet_task);
}
-#endif