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.

v1 -> v2

 * Fix up a build warning found by the kernel test robot

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              | 192 ++++++++-------------------
 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, 302 insertions(+), 287 deletions(-)
 create mode 100644 net/l2tp/trace.h

-- 
2.17.1

Reply via email to