aboutsummaryrefslogtreecommitdiff
path: root/sys/conf
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2023-03-27 11:59:30 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2023-03-27 13:55:44 +0000
commit19e43c163c64636d2590dca006e22f18d22f48b2 (patch)
tree1f283c4b32998f82cf891a8924ca726cacf17daf /sys/conf
parent21af4e09f4e8b17eae6d617f6433e7116f6b17a3 (diff)
downloadsrc-19e43c163c64636d2590dca006e22f18d22f48b2.tar.gz
src-19e43c163c64636d2590dca006e22f18d22f48b2.zip
netlink: add netlink KPI to the kernel by default
This change does the following: Base Netlink KPIs (ability to register the family, parse and/or write a Netlink message) are always present in the kernel. Specifically, * Implementation of genetlink family/group registration/removal, some base accessors (netlink_generic_kpi.c, 260 LoC) are compiled in unconditionally. * Basic TLV parser functions (netlink_message_parser.c, 507 LoC) are compiled in unconditionally. * Glue functions (netlink<>rtsock), malloc/core sysctl definitions (netlink_glue.c, 259 LoC) are compiled in unconditionally. * The rest of the KPI _functions_ are defined in the netlink_glue.c, but their implementation calls a pointer to either the stub function or the actual function, depending on whether the module is loaded or not. This approach allows to have only 1k LoC out of ~3.7k LoC (current sys/netlink implementation) in the kernel, which will not grow further. It also allows for the generic netlink kernel customers to load successfully without requiring Netlink module and operate correctly once Netlink module is loaded. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D39269
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/files4
-rw-r--r--sys/conf/options2
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/conf/files b/sys/conf/files
index 629283f7c071..94cd7135b277 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -4424,10 +4424,12 @@ netipsec/xform_ipcomp.c optional ipsec inet | ipsec inet6
netipsec/xform_tcp.c optional ipsec inet tcp_signature | \
ipsec inet6 tcp_signature | ipsec_support inet tcp_signature | \
ipsec_support inet6 tcp_signature
+netlink/netlink_generic_kpi.c standard
+netlink/netlink_glue.c standard
+netlink/netlink_message_parser.c standard
netlink/netlink_domain.c optional netlink
netlink/netlink_generic.c optional netlink
netlink/netlink_io.c optional netlink
-netlink/netlink_message_parser.c optional netlink
netlink/netlink_message_writer.c optional netlink
netlink/netlink_module.c optional netlink
netlink/netlink_route.c optional netlink
diff --git a/sys/conf/options b/sys/conf/options
index 6dd19582f346..173c56229084 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -463,7 +463,7 @@ MBUF_PROFILING
MBUF_STRESS_TEST
MROUTING opt_mrouting.h
NFSLOCKD
-NETLINK
+NETLINK opt_netlink.h
PF_DEFAULT_TO_DROP opt_pf.h
ROUTE_MPATH opt_route.h
ROUTETABLES opt_route.h