linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/4] net: switchdev: Tracepoints
@ 2024-02-23 11:44 Tobias Waldekranz
  2024-02-23 11:44 ` [PATCH v3 net-next 1/4] net: switchdev: Wrap enums in mapper macros Tobias Waldekranz
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Tobias Waldekranz @ 2024-02-23 11:44 UTC (permalink / raw)
  To: davem, kuba
  Cc: roopa, razor, bridge, netdev, jiri, ivecera, rostedt, mhiramat,
	linux-trace-kernel

Add a basic set of tracepoints to the switchdev layer that allows us
to monitor all messages being passed between a bridge and the devices
attached to it.

Deferred operations are additionally traced at the time they are
enqueued. This is useful in situations where we want to inspect the
conditions that lead to that message being generated, by looking at a
stacktrace for example.

Start off (1-2/4) by creating stringifiers for common switchdev
objects. This will primarily be used by the tracepoints for decoding
switchdev notifications, but drivers could also make use of them to
provide richer debug/error messages.

Then (3/4) create a common function through which all replay calls
pass, to create a natural point of instrumentation, before adding the
tracepoints themselves (4/4).

v2 -> v3:

Take a more conservative approach to the refactoring of
switchdev.c. In the end, I don't know that my previous attempt really
improved the situation much.

v1 -> v2:

- Fixup kernel-doc comment for switchdev_call_replay

Tobias Waldekranz (4):
  net: switchdev: Wrap enums in mapper macros
  net: switchdev: Add helpers to display switchdev objects as strings
  net: switchdev: Relay all replay messages through a central function
  net: switchdev: Add tracepoints

 include/net/switchdev.h          | 130 ++++++++++-----
 include/trace/events/switchdev.h |  74 ++++++++
 net/bridge/br_switchdev.c        |  10 +-
 net/switchdev/Makefile           |   2 +-
 net/switchdev/switchdev-str.c    | 278 +++++++++++++++++++++++++++++++
 net/switchdev/switchdev.c        |  87 +++++++++-
 6 files changed, 521 insertions(+), 60 deletions(-)
 create mode 100644 include/trace/events/switchdev.h
 create mode 100644 net/switchdev/switchdev-str.c

-- 
2.34.1


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

end of thread, other threads:[~2024-03-06 23:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-23 11:44 [PATCH v3 net-next 0/4] net: switchdev: Tracepoints Tobias Waldekranz
2024-02-23 11:44 ` [PATCH v3 net-next 1/4] net: switchdev: Wrap enums in mapper macros Tobias Waldekranz
2024-02-23 11:44 ` [PATCH v3 net-next 2/4] net: switchdev: Add helpers to display switchdev objects as strings Tobias Waldekranz
2024-02-23 11:44 ` [PATCH v3 net-next 3/4] net: switchdev: Relay all replay messages through a central function Tobias Waldekranz
2024-02-23 11:44 ` [PATCH v3 net-next 4/4] net: switchdev: Add tracepoints Tobias Waldekranz
2024-02-23 15:38   ` Steven Rostedt
2024-02-26 13:05     ` Tobias Waldekranz
2024-02-27 10:04     ` Paolo Abeni
2024-02-28 10:47       ` Tobias Waldekranz
2024-02-28 14:56         ` Steven Rostedt
2024-03-04 22:40           ` Tobias Waldekranz
2024-03-06 15:15             ` Steven Rostedt
2024-03-06 20:02               ` Tobias Waldekranz
2024-03-06 21:46                 ` Steven Rostedt
2024-03-06 22:45                   ` Tobias Waldekranz
2024-03-06 23:33                     ` Steven Rostedt

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