ktls: Drop all the INET and INET6 compile-time guards.

Consistent with 9fd0d9b16e, 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
This commit is contained in:
John Baldwin 2023-03-23 14:29:07 -07:00
parent f63aaffebc
commit d2dab20c2a

View File

@ -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 @@ ktls_start_kthreads(void)
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, &params));
}
#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