public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v3 0/7] DTrace TCP provider
@ 2025-07-09 14:09 Alan Maguire
  2025-07-09 14:09 ` [PATCH v3 1/7] cg: move get_member() to dt_cg.c Alan Maguire
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Alan Maguire @ 2025-07-09 14:09 UTC (permalink / raw)
  To: dtrace; +Cc: dtrace-devel, Alan Maguire

This series adds TCP provider support, where the probes are
implemented via underlying fbt and sdt probes.

Due to the use of the sock/inet_sock_set_state tracepoint, intended
for ~5.15 kernels and later.  Tried replacing this with

fbt::tcp_set_state:entry

but this misses a few state transitions, so stuck with using
the tracepoint.

All tests under test/unittest/tcp pass unmodified on an upstream
(6.15) kernel and 5.15 UEK7U3 kernel.  The updated remote address
retrieval patch helps ensure tests can all be run.

It implements all documented TCP provider probes:

accept-established, accept-refused, connnect-request,
connect-established, connect-refused, receive, send,
state-change

Changes since v2:

- document tslots change properly, add test (Eugene, patch 2, 3)
- move more generic type definitions to net.d
- retain depends_on provider tcp in tcp.d (Kris, patch 5)
- use depends_on library ip.d to ensure loading order (patch 5)
- revert tcp flags to uint8_t (Kris, patch 5)
- improve comments in tcp.d (Kris, Eugene, patch 5)
- fix up handling of ip:::send for older kernels to avoid null
  dereferences (Eugene, patch 5)
- fix up provider arguments to match spec (Eugene, patch 5)

Changes since RFC:

- fixed issues with test failures on UEK7 due to missing
  SYN_RCV state change
- moved get_member() to dt_cg.c (patch 1)

Alan Maguire (7):
  cg: move get_member() to dt_cg.c
  cg: bump number of TSLOTS to 6
  test/operators: extend ternary tests to cover inet_ntoa*()s
  providers: move network-generic definitions to net.d
  tcp: new provider
  dlibs: sync ip.d, net.d and tcp.d
  unittest/tcp: update test.x

 dlibs/aarch64/5.11/ip.d               |  27 +-
 dlibs/aarch64/5.11/net.d              |  31 +-
 dlibs/aarch64/5.11/tcp.d              |  67 +++--
 dlibs/aarch64/5.12/ip.d               |  27 +-
 dlibs/aarch64/5.12/net.d              |  31 +-
 dlibs/aarch64/5.12/tcp.d              |  67 +++--
 dlibs/aarch64/5.14/ip.d               |  27 +-
 dlibs/aarch64/5.14/net.d              |  31 +-
 dlibs/aarch64/5.14/tcp.d              |  67 +++--
 dlibs/aarch64/5.16/ip.d               |  27 +-
 dlibs/aarch64/5.16/net.d              |  31 +-
 dlibs/aarch64/5.16/tcp.d              |  67 +++--
 dlibs/aarch64/5.2/ip.d                |  27 +-
 dlibs/aarch64/5.2/net.d               |  31 +-
 dlibs/aarch64/5.2/tcp.d               |  67 +++--
 dlibs/aarch64/5.6/ip.d                |  27 +-
 dlibs/aarch64/5.6/net.d               |  31 +-
 dlibs/aarch64/5.6/tcp.d               |  67 +++--
 dlibs/aarch64/6.1/ip.d                |  27 +-
 dlibs/aarch64/6.1/net.d               |  31 +-
 dlibs/aarch64/6.1/tcp.d               |  67 +++--
 dlibs/aarch64/6.10/ip.d               |  27 +-
 dlibs/aarch64/6.10/net.d              |  31 +-
 dlibs/aarch64/6.10/tcp.d              |  67 +++--
 dlibs/x86_64/5.11/ip.d                |  27 +-
 dlibs/x86_64/5.11/net.d               |  31 +-
 dlibs/x86_64/5.11/tcp.d               |  67 +++--
 dlibs/x86_64/5.12/ip.d                |  27 +-
 dlibs/x86_64/5.12/net.d               |  31 +-
 dlibs/x86_64/5.12/tcp.d               |  67 +++--
 dlibs/x86_64/5.14/ip.d                |  27 +-
 dlibs/x86_64/5.14/net.d               |  31 +-
 dlibs/x86_64/5.14/tcp.d               |  67 +++--
 dlibs/x86_64/5.16/ip.d                |  27 +-
 dlibs/x86_64/5.16/net.d               |  31 +-
 dlibs/x86_64/5.16/tcp.d               |  67 +++--
 dlibs/x86_64/5.2/ip.d                 |  27 +-
 dlibs/x86_64/5.2/net.d                |  31 +-
 dlibs/x86_64/5.2/tcp.d                |  67 +++--
 dlibs/x86_64/5.6/ip.d                 |  27 +-
 dlibs/x86_64/5.6/net.d                |  31 +-
 dlibs/x86_64/5.6/tcp.d                |  67 +++--
 dlibs/x86_64/6.1/ip.d                 |  27 +-
 dlibs/x86_64/6.1/net.d                |  31 +-
 dlibs/x86_64/6.1/tcp.d                |  67 +++--
 dlibs/x86_64/6.10/ip.d                |  27 +-
 dlibs/x86_64/6.10/net.d               |  31 +-
 dlibs/x86_64/6.10/tcp.d               |  67 +++--
 libdtrace/Build                       |   2 +
 libdtrace/dt_cg.c                     |  39 +++
 libdtrace/dt_cg.h                     |   2 +
 libdtrace/dt_impl.h                   |   9 +-
 libdtrace/dt_prov_ip.c                |  45 +--
 libdtrace/dt_prov_tcp.c               | 413 ++++++++++++++++++++++++++
 libdtrace/dt_provider.c               |   1 +
 libdtrace/dt_provider.h               |   1 +
 libdtrace/ip.d                        |  27 +-
 libdtrace/net.d                       |  31 +-
 libdtrace/tcp.d                       |  67 +++--
 test/unittest/operators/tst.ternary.d |  20 +-
 test/unittest/operators/tst.ternary.r |   2 +
 test/unittest/tcp/test.x              |   8 +-
 62 files changed, 1680 insertions(+), 987 deletions(-)
 create mode 100644 libdtrace/dt_prov_tcp.c

-- 
2.39.3


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

end of thread, other threads:[~2025-07-21 20:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09 14:09 [PATCH v3 0/7] DTrace TCP provider Alan Maguire
2025-07-09 14:09 ` [PATCH v3 1/7] cg: move get_member() to dt_cg.c Alan Maguire
2025-07-21 20:37   ` [DTrace-devel] " Kris Van Hees
2025-07-09 14:09 ` [PATCH v3 2/7] cg: bump number of TSLOTS to 6 Alan Maguire
2025-07-21 20:39   ` [DTrace-devel] " Kris Van Hees
2025-07-09 14:09 ` [PATCH v3 3/7] test/operators: extend ternary tests to cover inet_ntoa*()s Alan Maguire
2025-07-09 14:09 ` [PATCH v3 4/7] providers: move network-generic definitions to net.d Alan Maguire
2025-07-09 14:09 ` [PATCH v3 5/7] tcp: new provider Alan Maguire
2025-07-09 14:09 ` [PATCH v3 6/7] dlibs: sync ip.d, net.d and tcp.d Alan Maguire
2025-07-09 14:09 ` [PATCH v3 7/7] unittest/tcp: update test.x Alan Maguire

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox