Date: Mon, 27 Mar 2023 11:39:34 -0400 From: Shawn Webb <shawn.webb@hardenedbsd.org> To: "Alexander V. Chernikov" <melifaro@FreeBSD.org> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 19e43c163c64 - main - netlink: add netlink KPI to the kernel by default Message-ID: <20230327153934.6lghvi7cnqodhig3@mutt-hbsd> In-Reply-To: <202303271355.32RDtqJ9006858@gitrepo.freebsd.org> References: <202303271355.32RDtqJ9006858@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--a7lhvfo6fvqg6fvl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 27, 2023 at 01:55:52PM +0000, Alexander V. Chernikov wrote: > The branch main has been updated by melifaro: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D19e43c163c64636d2590dca006= e22f18d22f48b2 >=20 > commit 19e43c163c64636d2590dca006e22f18d22f48b2 > Author: Alexander V. Chernikov <melifaro@FreeBSD.org> > AuthorDate: 2023-03-27 11:59:30 +0000 > Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> > CommitDate: 2023-03-27 13:55:44 +0000 >=20 > netlink: add netlink KPI to the kernel by default > =20 > This change does the following: > =20 > Base Netlink KPIs (ability to register the family, parse and/or > write a Netlink message) are always present in the kernel. Specifica= lly, > * 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. > =20 > This approach allows to have only 1k LoC out of ~3.7k LoC (current > sys/netlink implementation) in the kernel, which will not grow furth= er. > It also allows for the generic netlink kernel customers to load > successfully without requiring Netlink module and operate correctly > once Netlink module is loaded. > =20 > Reviewed by: imp > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D39269 > --- > sys/conf/files | 4 +- > sys/conf/options | 2 +- > sys/modules/carp/Makefile | 2 +- > sys/modules/netlink/Makefile | 6 +- > sys/net/route.c | 19 --- > sys/netinet/ip_carp.c | 2 + > sys/netlink/netlink_ctl.h | 10 +- > sys/netlink/netlink_domain.c | 24 --- > sys/netlink/netlink_generic.c | 282 +++--------------------------= ------ > sys/netlink/netlink_generic_kpi.c | 279 +++++++++++++++++++++++++++++= +++++ > sys/netlink/netlink_io.c | 2 + > sys/netlink/netlink_message_writer.c | 22 +-- > sys/netlink/netlink_message_writer.h | 86 +++++++++++ > sys/netlink/netlink_module.c | 26 +++- > sys/netlink/netlink_var.h | 44 ++++++ > sys/netlink/route/iface.c | 2 + > sys/netlink/route/neigh.c | 2 + > sys/netlink/route/nexthop.c | 2 + > sys/netlink/route/rt.c | 2 + > 19 files changed, 497 insertions(+), 321 deletions(-) >=20 > 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 | ip= sec 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 It appears netlink/netlink_glue.c was missed from this commit: cc: error: no such file or directory: '/usr/src/sys/netlink/netlink_glue.c' cc: error: no input files Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --a7lhvfo6fvqg6fvl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmQhuLAACgkQ/y5nonf4 4frv3A//dsAJVKnPGvH1exicW85aL88IGZUtzMlns+z0gz5oaE5swn/Y2suo1h9p gbA5Ah29R01Know3qsRmxqhzA8EAXwoDqEeKydfpBKh2Yrl75a1RnPMnrUh2xdc8 nHsRtpSj7W3fhPDRF3SD/hXnmWlkuEsMWLW6i45kkzEBg1xs26ol8WOpTlXXYnPS VGqddTXqhU0oI9RM/8scaGSZYSirkIV4z30n+oo52tQrayJi/Gg5C/O+OZU6bLXM v2h9lmVJTsdVqKZs5Cq9V6Y4qGNK+xxMc4KUhetyEeJTcvPUrRbEXfFfdLfGW3q4 jOmFTV9iAqG3JdFPOw+N0ncJ5JChHe3u/R+BSSaxxgcEq2Vd6+G//O+I7L1lXr2j JklMJohXF45EGRHIplkuouujcO6YDkqDrfperQJ/PFIJPhE2n6fY0xQXtE+e4sAJ ohyyqpSu6m3IeE8In1VmKUTxGz4qoc4EJcgzkN0DESRTJJMIJn9Fcfibbh93FeS4 AfixY84LkmR+3L9IEZRF0wB32FUyCjUpmO0IUivdtra1t4zn8SbYnXhz7V+HH5Pk 09c3KQRNRfjqH5fWXyzadpLVnZhf9aBzy4YdWkuY6gLJM0oC3vrX+ImUFZfvZQrt sMwURdC7QrvBwaTK0QS6eO7W7qm1YBUDyJJ5lLIWzdFCWi+tKHY= =jfyF -----END PGP SIGNATURE----- --a7lhvfo6fvqg6fvl--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230327153934.6lghvi7cnqodhig3>