Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Feb 2023 16:40:35 GMT
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 23d017b8d4c2 - stable/13 - netlink: add "netlink" to the list of kernel features
Message-ID:  <202302091640.319GeZO2047582@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by melifaro:

URL: https://cgit.FreeBSD.org/src/commit/?id=23d017b8d4c2a17bca15fe794dd0b2deb7e18f03

commit 23d017b8d4c2a17bca15fe794dd0b2deb7e18f03
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2023-01-30 11:13:51 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2023-02-09 16:37:15 +0000

    netlink: add "netlink" to the list of kernel features
    
    Reduce the amount of debug messages on module init/detach.
    
    MFC after:      1 week
    
    (cherry picked from commit 7fc9cfa57ccd4ee8ee71f8edfacfc26afab9cd2e)
---
 sys/netlink/netlink_module.c | 10 +++++-----
 sys/netlink/netlink_route.c  |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/netlink/netlink_module.c b/sys/netlink/netlink_module.c
index a433022b82b7..f820796a6028 100644
--- a/sys/netlink/netlink_module.c
+++ b/sys/netlink/netlink_module.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
 #include <machine/atomic.h>
 
 MALLOC_DEFINE(M_NETLINK, "netlink", "Memory used for netlink packets");
+FEATURE(netlink, "Netlink support");
 
 #define	DEBUG_MOD_NAME	nl_mod
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
@@ -156,7 +157,7 @@ netlink_register_proto(int proto, const char *proto_name, nl_handler_f handler)
 	nl_handlers[proto].cb = handler;
 	nl_handlers[proto].proto_name = proto_name;
 	NL_GLOBAL_UNLOCK();
-	NL_LOG(LOG_DEBUG, "Registered netlink %s(%d) handler", proto_name, proto);
+	NL_LOG(LOG_DEBUG2, "Registered netlink %s(%d) handler", proto_name, proto);
 	return (true);
 }
 
@@ -170,7 +171,7 @@ netlink_unregister_proto(int proto)
 	nl_handlers[proto].cb = NULL;
 	nl_handlers[proto].proto_name = NULL;
 	NL_GLOBAL_UNLOCK();
-	NL_LOG(LOG_DEBUG, "Unregistered netlink proto %d handler", proto);
+	NL_LOG(LOG_DEBUG2, "Unregistered netlink proto %d handler", proto);
 	return (true);
 }
 
@@ -203,12 +204,11 @@ netlink_modevent(module_t mod __unused, int what, void *priv __unused)
 
 	switch (what) {
 	case MOD_LOAD:
-		NL_LOG(LOG_DEBUG, "Loading");
-		NL_LOG(LOG_NOTICE, "netlink support is in BETA stage");
+		NL_LOG(LOG_DEBUG2, "Loading");
 		break;
 
 	case MOD_UNLOAD:
-		NL_LOG(LOG_DEBUG, "Unload called");
+		NL_LOG(LOG_DEBUG2, "Unload called");
 		if (can_unload()) {
 			NL_LOG(LOG_WARNING, "unloading");
 			netlink_unloading = 1;
diff --git a/sys/netlink/netlink_route.c b/sys/netlink/netlink_route.c
index 42b0bc66666e..037fd2170c66 100644
--- a/sys/netlink/netlink_route.c
+++ b/sys/netlink/netlink_route.c
@@ -115,7 +115,7 @@ static struct rtbridge *nlbridge_orig_p;
 static void
 rtnl_load(void *u __unused)
 {
-	NL_LOG(LOG_NOTICE, "rtnl loading");
+	NL_LOG(LOG_DEBUG2, "rtnl loading");
 	nlbridge_orig_p = netlink_callback_p;
 	netlink_callback_p = &nlbridge;
 	rtnl_neighs_init();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302091640.319GeZO2047582>