From 239d718bc7295535eef6a6980eb5d69e0f53fe8d Mon Sep 17 00:00:00 2001 From: Robert Lubos Date: Tue, 19 Mar 2024 16:23:50 +0100 Subject: [PATCH] net: ipv6: Introduce separate logger module for IPv6 ND Debugging IPv6 Neighbor Discovery issues requires to enable full IPv6 logs, which can get bloated given it provides logs for every single packet. We should be able to focus on IPv6 ND logs only, hence introduce a separate log module for IPv6 ND. Signed-off-by: Robert Lubos --- subsys/net/ip/Kconfig.ipv6 | 6 ++++++ subsys/net/ip/ipv6_nbr.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/subsys/net/ip/Kconfig.ipv6 b/subsys/net/ip/Kconfig.ipv6 index 9367e068e7..d132febf72 100644 --- a/subsys/net/ip/Kconfig.ipv6 +++ b/subsys/net/ip/Kconfig.ipv6 @@ -206,6 +206,12 @@ module-str = Log level for core IPv6 module-help = Enables core IPv6 code to output debug messages. source "subsys/net/Kconfig.template.log_config.net" +module = NET_IPV6_ND +module-dep = NET_LOG +module-str = Log level for IPv6 Neighbor Discovery +module-help = Enables IPv6 Neighbor Discovery code to output debug messages. +source "subsys/net/Kconfig.template.log_config.net" + module = NET_ICMPV6 module-dep = NET_LOG module-str = Log level for ICMPv6 diff --git a/subsys/net/ip/ipv6_nbr.c b/subsys/net/ip/ipv6_nbr.c index a2da488a4f..34979eeb87 100644 --- a/subsys/net/ip/ipv6_nbr.c +++ b/subsys/net/ip/ipv6_nbr.c @@ -14,7 +14,7 @@ #define NET_DEBUG_NBR 0 #include -LOG_MODULE_DECLARE(net_ipv6, CONFIG_NET_IPV6_LOG_LEVEL); +LOG_MODULE_REGISTER(net_ipv6_nd, CONFIG_NET_IPV6_ND_LOG_LEVEL); #include #include