Skip to content

Commit

Permalink
net: ipv6: Introduce separate logger module for IPv6 ND
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rlubos authored and aescolar committed Mar 21, 2024
1 parent 0d44528 commit 239d718
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions subsys/net/ip/Kconfig.ipv6
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion subsys/net/ip/ipv6_nbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#define NET_DEBUG_NBR 0

#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(net_ipv6, CONFIG_NET_IPV6_LOG_LEVEL);
LOG_MODULE_REGISTER(net_ipv6_nd, CONFIG_NET_IPV6_ND_LOG_LEVEL);

#include <errno.h>
#include <stdlib.h>
Expand Down

0 comments on commit 239d718

Please sign in to comment.