1# Debug Options
2
3# Copyright (c) 2016 Intel Corporation.
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig NET_LOG
7	bool "Network stack logging and debugging"
8	select LOG
9	help
10	  Enable logging in various parts of the network stack.
11	  Specific debugging options to other sub-menus will be unlocked
12	  as well (IPv6, IPv4, ...).
13
14module = NET_PKT
15module-dep = NET_LOG
16module-str = Log level for network packet and buffer allocation
17module-help = Enables debug of network packet and buffer allocations and frees.
18source "subsys/net/Kconfig.template.log_config.net"
19
20config NET_DEBUG_NET_PKT_ALLOC
21	bool "Debug network packet and buffer individual allocation"
22	default y if NET_PKT_LOG_LEVEL_DBG
23	help
24	  Enables printing of network packet and buffer allocations and frees for
25	  each allocation. This can produce lot of output so it is disabled by
26	  default.
27
28config NET_DEBUG_NET_PKT_EXTERNALS
29	int "How many external network packet allocations"
30	default 0
31	help
32	  How many external net_pkt objects are there in user specific pools.
33	  This value is used when allocating space for tracking the
34	  memory allocations.
35
36config NET_DEBUG_NET_PKT_NON_FRAGILE_ACCESS
37	bool "Reduce r/w fragility by resetting the packet cursor when freed"
38	select NET_DEBUG_NET_PKT_ALLOC
39	help
40	  This MUST not be used unless you have an hard to catch bug. This will
41	  reset the pkt cursor when it's freed, so any subsequent r/w operations
42	  will not segfault, but just bail out and hopefully it will enable you
43	  to know who/where the packet was freed already. Do not set this, by
44	  any means, unless you are actively debugging.
45
46if !NET_RAW_MODE
47
48module = NET_CORE
49module-dep = NET_LOG
50module-str = Log level for core IP stack
51module-help = Enables core network stack code to output debug messages.
52source "subsys/net/Kconfig.template.log_config.net"
53
54module = NET_IF
55module-dep = NET_LOG
56module-str = Log level for network interface code
57module-help = Enables network interface code to output debug messages.
58source "subsys/net/Kconfig.template.log_config.net"
59
60module = NET_TC
61module-dep = NET_LOG
62module-str = Log level for network traffic class code
63module-help = Enables network traffic class code to output debug messages.
64source "subsys/net/Kconfig.template.log_config.net"
65
66module = NET_UTILS
67module-dep = NET_LOG
68module-str = Log level for utility functions in IP stack
69module-help = Enables utility functions to output debug messages.
70source "subsys/net/Kconfig.template.log_config.net"
71
72module = NET_CONTEXT
73module-dep = NET_LOG
74module-str = Log level for network context allocation
75module-help = Enables printing of network context allocations and frees.
76source "subsys/net/Kconfig.template.log_config.net"
77
78module = NET_CONN
79module-dep = NET_LOG
80module-str = Log level for UDP/TCP connection handling
81module-help = Enables UDP/TCP connection debug messages.
82source "subsys/net/Kconfig.template.log_config.net"
83
84module = NET_ROUTE
85module-dep = NET_LOG
86module-str = Log level for route management
87module-help = Enables routing engine debug messages.
88source "subsys/net/Kconfig.template.log_config.net"
89
90endif # NET_RAW_MODE
91