netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/9] l2tp: replace custom logging code with tracepoints
@ 2020-08-21 10:47 Tom Parkin
  2020-08-21 10:47 ` [PATCH 1/9] l2tp: don't log data frames Tom Parkin
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Tom Parkin @ 2020-08-21 10:47 UTC (permalink / raw)
  To: netdev; +Cc: jchapman, Tom Parkin

The l2tp subsystem implemented custom logging macros for debugging
purposes which were controlled using a set of debugging flags in each
tunnel and session structure.

A more standard and easier-to-use approach is to use tracepoints.

This patchset refactors l2tp to:

 * remove excessive logging
 * tweak useful log messages to use the standard pr_* calls for logging
   rather than the l2tp wrappers
 * replace debug-level logging with tracepoints
 * add tracepoints for capturing tunnel and session lifetime events

I note that checkpatch.pl warns about the layout of code in the
newly-added file net/l2tp/trace.h.  When adding this file I followed the
example(s) of other tracepoint files in the net/ subtree since it seemed
preferable to adhere to the prevailing style rather than follow
checkpatch.pl's advice in this instance.  If that's the wrong
approach please let me know.

Tom Parkin (9):
  l2tp: don't log data frames
  l2tp: remove noisy logging, use appropriate log levels
  l2tp: use standard API for warning log messages
  l2tp: add tracepoint infrastructure to core
  l2tp: add tracepoint definitions in trace.h
  l2tp: add tracepoints to l2tp_core.c
  l2tp: remove custom logging macros
  l2tp: remove tunnel and session debug flags field
  docs: networking: add tracepoint info to l2tp.rst

 Documentation/networking/l2tp.rst |  37 ++----
 include/uapi/linux/if_pppol2tp.h  |   2 +-
 include/uapi/linux/l2tp.h         |   6 +-
 net/l2tp/Makefile                 |   2 +
 net/l2tp/l2tp_core.c              | 178 +++++++------------------
 net/l2tp/l2tp_core.h              |  23 +---
 net/l2tp/l2tp_debugfs.c           |   4 +-
 net/l2tp/l2tp_eth.c               |  11 --
 net/l2tp/l2tp_ip.c                |  15 ---
 net/l2tp/l2tp_ip6.c               |  15 ---
 net/l2tp/l2tp_netlink.c           |  16 +--
 net/l2tp/l2tp_ppp.c               |  55 ++------
 net/l2tp/trace.h                  | 211 ++++++++++++++++++++++++++++++
 13 files changed, 297 insertions(+), 278 deletions(-)
 create mode 100644 net/l2tp/trace.h

-- 
2.17.1


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

end of thread, other threads:[~2020-08-21 16:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-21 10:47 [PATCH net-next 0/9] l2tp: replace custom logging code with tracepoints Tom Parkin
2020-08-21 10:47 ` [PATCH 1/9] l2tp: don't log data frames Tom Parkin
2020-08-21 12:28   ` kernel test robot
2020-08-21 16:33     ` Tom Parkin
2020-08-21 10:47 ` [PATCH 2/9] l2tp: remove noisy logging, use appropriate log levels Tom Parkin
2020-08-21 10:47 ` [PATCH 3/9] l2tp: use standard API for warning log messages Tom Parkin
2020-08-21 10:47 ` [PATCH 4/9] l2tp: add tracepoint infrastructure to core Tom Parkin
2020-08-21 10:47 ` [PATCH 5/9] l2tp: add tracepoint definitions in trace.h Tom Parkin
2020-08-21 10:47 ` [PATCH 6/9] l2tp: add tracepoints to l2tp_core.c Tom Parkin
2020-08-21 10:47 ` [PATCH 7/9] l2tp: remove custom logging macros Tom Parkin
2020-08-21 10:47 ` [PATCH 8/9] l2tp: remove tunnel and session debug flags field Tom Parkin
2020-08-21 10:47 ` [PATCH 9/9] docs: networking: add tracepoint info to l2tp.rst Tom Parkin
2020-08-21 11:25 ` [PATCH net-next 0/9] l2tp: replace custom logging code with tracepoints James Chapman

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