Skip to content

tun: debug messages cleanup

Michal Kubecek lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5tun: fix misleading comment formatdrivers/net/tun.c+1 -20 replies
2/5tun: get rid of DBG1() macrodrivers/net/tun.c+0 -140 replies
3/5tun: drop useless debugging statementsdrivers/net/tun.c+0 -130 replies
4/5tun: replace tun_debug() by netif_info()drivers/net/tun.c+27 -330 replies
5/5tun: drop TUN_DEBUG and tun_debug()drivers/net/tun.c+0 -170 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/5] tun: debug messages cleanup

While testing ethtool output for "strange" devices, I noticed confusing and obviously incorrect message level information for a tun device and sent a quick fix. The result of the upstream discussion was that tun driver would rather deserve a more complex cleanup of the way it handles debug messages.

The main problem is that all debugging statements and setting of message level are controlled by TUN_DEBUG macro which is only defined if one edits the source and rebuilds the module, otherwise all DBG1() and tun_debug() statements do nothing.

This series drops the TUN_DEBUG switch and replaces custom tun_debug() macro with standard netif_info() so that message level (mask) set and displayed using ethtool works as expected. Some debugging messages are dropped as they only notify about entering a function which can be done easily using ftrace or kprobe.

Patch 1 is a trivial fix for compilation warning with W=1.

Michal Kubecek (5):
tun: fix misleading comment format
tun: get rid of DBG1() macro
tun: drop useless debugging statements
tun: replace tun_debug() by netif_info()
tun: drop TUN_DEBUG and tun_debug()

 drivers/net/tun.c | 105 ++++++++++++----------------------------------
 1 file changed, 27 insertions(+), 78 deletions(-)
Signature · 1 line
2.25.1