git: fa554de7746d - main - netlink: reduce default log levels

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Fri, 12 May 2023 12:33:15 UTC
The branch main has been updated by kp:

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

commit fa554de7746d88959738e4cb978608af8ce479c1
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2023-05-11 13:08:42 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2023-05-12 12:32:57 +0000

    netlink: reduce default log levels
    
    Reduce the default log level for netlink to LOG_INFO. This removes a
    number of messages such as
    
    > [nl_iface] dump_sa: unsupported family: 0, skipping
    or
    > [nl_iface] get_operstate_ether: error calling SIOCGIFMEDIA on vlan0: 22
    
    that are useful for debugging, but not for most users.
    
    Reviewed by:    melifaro
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D40062
---
 sys/compat/linux/linux_netlink.c     | 2 +-
 sys/netlink/netlink_domain.c         | 2 +-
 sys/netlink/netlink_generic.c        | 2 +-
 sys/netlink/netlink_generic_kpi.c    | 2 +-
 sys/netlink/netlink_io.c             | 2 +-
 sys/netlink/netlink_message_parser.c | 2 +-
 sys/netlink/netlink_message_writer.c | 2 +-
 sys/netlink/netlink_module.c         | 2 +-
 sys/netlink/netlink_route.c          | 2 +-
 sys/netlink/route/iface.c            | 2 +-
 sys/netlink/route/iface_drivers.c    | 2 +-
 sys/netlink/route/neigh.c            | 2 +-
 sys/netlink/route/nexthop.c          | 2 +-
 sys/netlink/route/rt.c               | 2 +-
 14 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c
index 775a36994d2d..85c0e6ba33a0 100644
--- a/sys/compat/linux/linux_netlink.c
+++ b/sys/compat/linux/linux_netlink.c
@@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_linux
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 static bool
 valid_rta_size(const struct rtattr *rta, int sz)
diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c
index 7538336bdc45..9138e3417cf6 100644
--- a/sys/netlink/netlink_domain.c
+++ b/sys/netlink/netlink_domain.c
@@ -56,7 +56,7 @@
 #define	DEBUG_MOD_NAME	nl_domain
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 _Static_assert((NLP_MAX_GROUPS % 64) == 0,
     "NLP_MAX_GROUPS has to be multiple of 64");
diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c
index 4595b3074d50..32009e74e6a0 100644
--- a/sys/netlink/netlink_generic.c
+++ b/sys/netlink/netlink_generic.c
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_generic
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 static int dump_family(struct nlmsghdr *hdr, struct genlmsghdr *ghdr,
     const struct genl_family *gf, struct nl_writer *nw);
diff --git a/sys/netlink/netlink_generic_kpi.c b/sys/netlink/netlink_generic_kpi.c
index b64f6bd3f1b6..d64c53b1b3d6 100644
--- a/sys/netlink/netlink_generic_kpi.c
+++ b/sys/netlink/netlink_generic_kpi.c
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_generic_kpi
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG3);
+_DECLARE_DEBUG(LOG_INFO);
 
 
 /*
diff --git a/sys/netlink/netlink_io.c b/sys/netlink/netlink_io.c
index 9f5ecf63a07d..0961e6ae89d6 100644
--- a/sys/netlink/netlink_io.c
+++ b/sys/netlink/netlink_io.c
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_io
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 /*
  * The logic below provide a p2p interface for receiving and
diff --git a/sys/netlink/netlink_message_parser.c b/sys/netlink/netlink_message_parser.c
index c6cd82260e5b..a1551d3f3a91 100644
--- a/sys/netlink/netlink_message_parser.c
+++ b/sys/netlink/netlink_message_parser.c
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_parser
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 bool
 nlmsg_report_err_msg(struct nl_pstate *npt, const char *fmt, ...)
diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c
index ef568ecbca07..dbbbec69d9fd 100644
--- a/sys/netlink/netlink_message_writer.c
+++ b/sys/netlink/netlink_message_writer.c
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_writer
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 /*
  * The goal of this file is to provide convenient message writing KPI on top of
diff --git a/sys/netlink/netlink_module.c b/sys/netlink/netlink_module.c
index 6835c4a0e730..55df52fc85b6 100644
--- a/sys/netlink/netlink_module.c
+++ b/sys/netlink/netlink_module.c
@@ -52,7 +52,7 @@ FEATURE(netlink, "Netlink support");
 #define	DEBUG_MOD_NAME	nl_mod
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 
 #define NL_MAX_HANDLERS	20
diff --git a/sys/netlink/netlink_route.c b/sys/netlink/netlink_route.c
index ce0c0eb36dbc..1fd6d5da63a9 100644
--- a/sys/netlink/netlink_route.c
+++ b/sys/netlink/netlink_route.c
@@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_route_core
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 #define	HANDLER_MAX_NUM	(NL_RTM_MAX + 10)
 static const struct rtnl_cmd_handler *rtnl_handler[HANDLER_MAX_NUM] = {};
diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c
index aaed11e637a2..adcf58b72e1b 100644
--- a/sys/netlink/route/iface.c
+++ b/sys/netlink/route/iface.c
@@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_iface
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 struct netlink_walkargs {
 	struct nl_writer *nw;
diff --git a/sys/netlink/route/iface_drivers.c b/sys/netlink/route/iface_drivers.c
index 6f6adc323be6..cebbb07b5cac 100644
--- a/sys/netlink/route/iface_drivers.c
+++ b/sys/netlink/route/iface_drivers.c
@@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_iface_drivers
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 /*
  * Generic modification interface handler.
diff --git a/sys/netlink/route/neigh.c b/sys/netlink/route/neigh.c
index db72bc9bfd4e..ced2c74284e3 100644
--- a/sys/netlink/route/neigh.c
+++ b/sys/netlink/route/neigh.c
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_neigh
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 static int lle_families[] = { AF_INET, AF_INET6 };
 
diff --git a/sys/netlink/route/nexthop.c b/sys/netlink/route/nexthop.c
index 94cc6caf7d82..2a1585616e07 100644
--- a/sys/netlink/route/nexthop.c
+++ b/sys/netlink/route/nexthop.c
@@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_nhop
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 /*
  * This file contains the logic to maintain kernel nexthops and
diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c
index cbe9ee001dfd..01a7d7ed3e16 100644
--- a/sys/netlink/route/rt.c
+++ b/sys/netlink/route/rt.c
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
 #define	DEBUG_MOD_NAME	nl_route
 #define	DEBUG_MAX_LEVEL	LOG_DEBUG3
 #include <netlink/netlink_debug.h>
-_DECLARE_DEBUG(LOG_DEBUG);
+_DECLARE_DEBUG(LOG_INFO);
 
 static unsigned char
 get_rtm_type(const struct nhop_object *nh)