All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] Introduce variable-length sockaddr trace fields
@ 2022-01-11 18:59 Chuck Lever
  2022-01-11 18:59 ` [PATCH RFC 1/2] trace: Introduce helpers to safely handle dynamic-sized sockaddrs Chuck Lever
  2022-01-11 18:59 ` [PATCH RFC 2/2] NFSD: Use __sockaddr field to store socket addresses Chuck Lever
  0 siblings, 2 replies; 5+ messages in thread
From: Chuck Lever @ 2022-01-11 18:59 UTC (permalink / raw)
  To: linux-trace-devel, linux-nfs

Here's my naive first pass. Tested with a modified libtraceevent.

            nfsd-1006  [000]   615.380178: nfsd_cb_args:         addr=192.168.2.67:38673 client 61ddcfcf:54b96b71 prog=1073741824 ident=1
            nfsd-1006  [000]   615.380242: nfsd_cb_probe:        addr=192.168.2.67:38673 client 61ddcfcf:54b96b71 state=UNKNOWN
    kworker/u8:5-79    [002]   615.380307: nfsd_cb_setup:        addr=192.168.2.67:38673 client 61ddcfcf:54b96b71 proto=tcp flavor=sys
    kworker/u8:4-78    [001]   615.380459: nfsd_cb_state:        addr=192.168.2.67:38673 client 61ddcfcf:54b96b71 state=UP
            nfsd-1006  [000]   615.380599: nfsd_cb_args:         addr=192.168.2.67:38673 client 61ddcfcf:54b96b71 prog=1073741824 ident=1
            nfsd-1006  [000]   615.380661: nfsd_cb_state:        addr=192.168.2.67:38673 client 61ddcfcf:54b96b71 state=UNKNOWN
            nfsd-1006  [000]   615.380661: nfsd_cb_probe:        addr=192.168.2.67:38673 client 61ddcfcf:54b96b71 state=UNKNOWN
    kworker/u8:4-78    [000]   615.380715: nfsd_cb_setup:        addr=192.168.2.67:38673 client 61ddcfcf:54b96b71 proto=tcp flavor=sys
    kworker/u8:4-78    [000]   615.380865: nfsd_cb_state:        addr=192.168.2.67:38673 client 61ddcfcf:54b96b71 state=UP

And in the raw:

            nfsd-1006  [000]   615.380178: nfsd_cb_args:          cl_boot=61ddcfcf cl_id=54b96b71 prog=1073741824 ident=1 addr=ARRAY[02, 00, 97, 11, c0, a8, 02, 43, 00, 00, 00, 00, 00, 00, 00, 00]
            nfsd-1006  [000]   615.380242: nfsd_cb_probe:         state=0x1 cl_boot=61ddcfcf cl_id=54b96b71 addr=ARRAY[02, 00, 97, 11, c0, a8, 02, 43, 00, 00, 00, 00, 00, 00, 00, 00]
    kworker/u8:5-79    [002]   615.380307: nfsd_cb_setup:         cl_boot=61ddcfcf cl_id=54b96b71 authflavor=0x1 addr=ARRAY[02, 00, 97, 11, c0, a8, 02, 43, 00, 00, 00, 00, 00, 00, 00, 00] netid=tcp
    kworker/u8:4-78    [001]   615.380459: nfsd_cb_state:         state=0x0 cl_boot=61ddcfcf cl_id=54b96b71 addr=ARRAY[02, 00, 97, 11, c0, a8, 02, 43, 00, 00, 00, 00, 00, 00, 00, 00]
            nfsd-1006  [000]   615.380599: nfsd_cb_args:          cl_boot=61ddcfcf cl_id=54b96b71 prog=1073741824 ident=1 addr=ARRAY[02, 00, 97, 11, c0, a8, 02, 43, 00, 00, 00, 00, 00, 00, 00, 00]
            nfsd-1006  [000]   615.380661: nfsd_cb_state:         state=0x1 cl_boot=61ddcfcf cl_id=54b96b71 addr=ARRAY[02, 00, 97, 11, c0, a8, 02, 43, 00, 00, 00, 00, 00, 00, 00, 00]
            nfsd-1006  [000]   615.380661: nfsd_cb_probe:         state=0x1 cl_boot=61ddcfcf cl_id=54b96b71 addr=ARRAY[02, 00, 97, 11, c0, a8, 02, 43, 00, 00, 00, 00, 00, 00, 00, 00]
    kworker/u8:4-78    [000]   615.380715: nfsd_cb_setup:         cl_boot=61ddcfcf cl_id=54b96b71 authflavor=0x1 addr=ARRAY[02, 00, 97, 11, c0, a8, 02, 43, 00, 00, 00, 00, 00, 00, 00, 00] netid=tcp
    kworker/u8:4-78    [000]   615.380865: nfsd_cb_state:         state=0x0 cl_boot=61ddcfcf cl_id=54b96b71 addr=ARRAY[02, 00, 97, 11, c0, a8, 02, 43, 00, 00, 00, 00, 00, 00, 00, 00]

Comments welcome.

---

Chuck Lever (2):
      trace: Introduce helpers to safely handle dynamic-sized sockaddrs
      NFSD: Use __sockaddr field to store socket addresses


 fs/nfsd/trace.h              | 79 ++++++++++++++++++------------------
 include/trace/bpf_probe.h    |  3 ++
 include/trace/perf.h         |  3 ++
 include/trace/trace_events.h | 18 ++++++++
 4 files changed, 63 insertions(+), 40 deletions(-)

--
Chuck Lever

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

end of thread, other threads:[~2022-01-13 18:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 18:59 [PATCH RFC 0/2] Introduce variable-length sockaddr trace fields Chuck Lever
2022-01-11 18:59 ` [PATCH RFC 1/2] trace: Introduce helpers to safely handle dynamic-sized sockaddrs Chuck Lever
2022-01-13 17:24   ` Steven Rostedt
2022-01-13 18:13     ` Chuck Lever III
2022-01-11 18:59 ` [PATCH RFC 2/2] NFSD: Use __sockaddr field to store socket addresses Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.