Skip to content

net: add more tracepoints to TCP/IP stack

Cong Wang bpf netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13net: introduce a new header file include/trace/events/ip.hinclude/trace/events/ip.h net/core/net-traces.c+48 -00 replies
2/13ipv4: introduce tracepoint trace_ip_queue_xmit()include/trace/events/ip.h net/ipv4/ip_output.c+51 -17 replies
3/13tcp: introduce tracepoint trace_tcp_transmit_skb()include/trace/events/tcp.h net/ipv4/tcp_output.c+16 -30 replies
4/13udp: introduce tracepoint trace_udp_send_skb()include/trace/events/udp.h net/ipv4/udp.c+22 -10 replies
5/13udp: introduce tracepoint trace_udp_v6_send_skb()include/trace/events/udp.h net/core/net-traces.c net/ipv6/udp.c+26 -00 replies
6/13ipv4: introduce tracepoint trace_ip_rcv()include/trace/events/ip.h net/ipv4/ip_input.c+18 -00 replies
7/13ipv6: introduce tracepoint trace_ipv6_rcv()include/trace/events/ip.h net/core/net-traces.c net/ipv6/ip6_input.c+23 -10 replies
8/13ipv4: introduce tracepoint trace_ip_local_deliver_finish()include/trace/events/ip.h net/ipv4/ip_input.c+23 -10 replies
9/13udp: introduce tracepoint trace_udp_rcv()include/trace/events/udp.h net/ipv4/udp.c+24 -10 replies
10/13ipv6: introduce tracepoint trace_udpv6_rcv()include/trace/events/udp.h net/core/net-traces.c net/ipv6/udp.c+24 -10 replies
11/13tcp: introduce tracepoint trace_tcp_v4_rcv()include/trace/events/tcp.h net/ipv4/tcp_ipv4.c+9 -00 replies
12/13ipv6: introduce tracepoint trace_tcp_v6_rcv()include/trace/events/tcp.h net/core/net-traces.c net/ipv6/tcp_ipv6.c+13 -00 replies
13/13sock: introduce tracepoint trace_sk_data_ready()include/trace/events/sock.h net/ipv4/tcp_input.c net/ipv4/udp.c+30 -20 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchCong Wang
1/13R-b
2/13R-b
3/13R-b
4/13R-b
5/13R-b
6/13R-b
7/13R-b
8/13R-b
9/13R-b
10/13R-b
11/13R-b
12/13R-b
13/13R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Patch net-next 00/13] net: add more tracepoints to TCP/IP stack

From: Cong Wang <[email protected]>

This patchset adds 12 more tracepoints to TCP/IP stack, both IPv4 and IPv6. The goal is to trace skb in different layers and to measure the latency of each layer.

We only add information we need to each trace point. If any other information is needed, it is easy to extend without breaking ABI, see commit 3dd344ea84e1 ("net: tracepoint: exposing sk_family in all tcp:tracepoints").

And similar to trace_qdisc_enqueue(), we only intend to trace success cases, because most (if not all) failure cases can be traced via kfree_skb() even if they are really interesting.

Lastly, per previous discussion, trace ring buffer is only accessible to privileged users, it is safe to use a real kernel address with %px.

Qitao Xu (13):
net: introduce a new header file include/trace/events/ip.h
ipv4: introduce tracepoint trace_ip_queue_xmit()
tcp: introduce tracepoint trace_tcp_transmit_skb()
udp: introduce tracepoint trace_udp_send_skb()
udp: introduce tracepoint trace_udp_v6_send_skb()
ipv4: introduce tracepoint trace_ip_rcv()
ipv6: introduce tracepoint trace_ipv6_rcv()
ipv4: introduce tracepoint trace_ip_local_deliver_finish()
udp: introduce tracepoint trace_udp_rcv()
ipv6: introduce tracepoint trace_udpv6_rcv()
tcp: introduce tracepoint trace_tcp_v4_rcv()
ipv6: introduce tracepoint trace_tcp_v6_rcv()
sock: introduce tracepoint trace_sk_data_ready()

 include/trace/events/ip.h   | 140 ++++++++++++++++++++++++++++++++++++
 include/trace/events/sock.h |  19 +++++
 include/trace/events/tcp.h  |  27 ++++++-
 include/trace/events/udp.h  |  74 +++++++++++++++++++
 net/core/net-traces.c       |   7 ++
 net/ipv4/ip_input.c         |   9 ++-
 net/ipv4/ip_output.c        |  10 ++-
 net/ipv4/tcp_input.c        |   8 ++-
 net/ipv4/tcp_ipv4.c         |   2 +
 net/ipv4/tcp_output.c       |   8 ++-
 net/ipv4/udp.c              |  17 ++++-
 net/ipv6/ip6_input.c        |   5 +-
 net/ipv6/tcp_ipv6.c         |   3 +
 net/ipv6/udp.c              |   9 ++-
 14 files changed, 327 insertions(+), 11 deletions(-)
 create mode 100644 include/trace/events/ip.h
Signature · 1 line
2.27.0