git: 7fc9cfa57ccd - main - netlink: add "netlink" to the list of kernel features
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 30 Jan 2023 11:33:51 UTC
The branch main has been updated by melifaro:
URL: https://cgit.FreeBSD.org/src/commit/?id=7fc9cfa57ccd4ee8ee71f8edfacfc26afab9cd2e
commit 7fc9cfa57ccd4ee8ee71f8edfacfc26afab9cd2e
Author: Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2023-01-30 11:13:51 +0000
Commit: Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2023-01-30 11:23:53 +0000
netlink: add "netlink" to the list of kernel features
Reduce the amount of debug messages on module init/detach.
MFC after: 1 week
---
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();