netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] tun: debug messages cleanup
@ 2020-03-04 16:23 Michal Kubecek
  2020-03-04 16:23 ` [PATCH net-next 1/5] tun: fix misleading comment format Michal Kubecek
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Michal Kubecek @ 2020-03-04 16:23 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, netdev; +Cc: linux-kernel

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(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-03-06  5:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 16:23 [PATCH net-next 0/5] tun: debug messages cleanup Michal Kubecek
2020-03-04 16:23 ` [PATCH net-next 1/5] tun: fix misleading comment format Michal Kubecek
2020-03-04 16:24 ` [PATCH net-next 2/5] tun: get rid of DBG1() macro Michal Kubecek
2020-03-04 16:24 ` [PATCH net-next 3/5] tun: drop useless debugging statements Michal Kubecek
2020-03-04 16:24 ` [PATCH net-next 4/5] tun: replace tun_debug() by netif_info() Michal Kubecek
2020-03-04 16:24 ` [PATCH net-next 5/5] tun: drop TUN_DEBUG and tun_debug() Michal Kubecek
2020-03-06  5:38 ` [PATCH net-next 0/5] tun: debug messages cleanup David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).