xref: /linux-6.15/net/Kconfig.debug (revision 76aed953)
14d92b95fSEric Dumazet# SPDX-License-Identifier: GPL-2.0-only
24d92b95fSEric Dumazet
34d92b95fSEric Dumazetconfig NET_DEV_REFCNT_TRACKER
44d92b95fSEric Dumazet	bool "Enable net device refcount tracking"
5caddb4e0SLukas Bulwahn	depends on DEBUG_KERNEL && STACKTRACE_SUPPORT && NET
64d92b95fSEric Dumazet	select REF_TRACKER
74d92b95fSEric Dumazet	default n
84d92b95fSEric Dumazet	help
94d92b95fSEric Dumazet	  Enable debugging feature to track device references.
104d92b95fSEric Dumazet	  This adds memory and cpu costs.
119ba74e6cSEric Dumazet
129ba74e6cSEric Dumazetconfig NET_NS_REFCNT_TRACKER
139ba74e6cSEric Dumazet	bool "Enable networking namespace refcount tracking"
14caddb4e0SLukas Bulwahn	depends on DEBUG_KERNEL && STACKTRACE_SUPPORT && NET
159ba74e6cSEric Dumazet	select REF_TRACKER
169ba74e6cSEric Dumazet	default n
179ba74e6cSEric Dumazet	help
189ba74e6cSEric Dumazet	  Enable debugging feature to track netns references.
199ba74e6cSEric Dumazet	  This adds memory and cpu costs.
20d268c1f5SEric Dumazet
21d268c1f5SEric Dumazetconfig DEBUG_NET
22d268c1f5SEric Dumazet	bool "Add generic networking debug"
23eb0b39efSEric Dumazet	depends on DEBUG_KERNEL && NET
24d268c1f5SEric Dumazet	help
25d268c1f5SEric Dumazet	  Enable extra sanity checks in networking.
26d268c1f5SEric Dumazet	  This is mostly used by fuzzers, but is safe to select.
27*76aed953SKuniyuki Iwashima
28*76aed953SKuniyuki Iwashimaconfig DEBUG_NET_SMALL_RTNL
29*76aed953SKuniyuki Iwashima	bool "Add extra per-netns mutex inside RTNL"
30*76aed953SKuniyuki Iwashima	depends on DEBUG_KERNEL && NET && LOCK_DEBUGGING_SUPPORT
31*76aed953SKuniyuki Iwashima	select PROVE_LOCKING
32*76aed953SKuniyuki Iwashima	default n
33*76aed953SKuniyuki Iwashima	help
34*76aed953SKuniyuki Iwashima	  rtnl_lock() is being replaced with rtnl_net_lock() that
35*76aed953SKuniyuki Iwashima	  acquires the global RTNL and a small per-netns RTNL mutex.
36*76aed953SKuniyuki Iwashima
37*76aed953SKuniyuki Iwashima	  During the conversion, rtnl_net_lock() just adds an extra
38*76aed953SKuniyuki Iwashima	  mutex in every RTNL scope and slows down the operations.
39*76aed953SKuniyuki Iwashima
40*76aed953SKuniyuki Iwashima	  Once the conversion completes, rtnl_lock() will be removed
41*76aed953SKuniyuki Iwashima	  and rtnetlink will gain per-netns scalability.
42