tcp: Add skb addr and sock addr to arguments of tracepoint tcp_probe.
authorfuyuanli <fuyuanli@didiglobal.com>
Tue, 5 Mar 2024 03:04:17 +0000 (11:04 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Mar 2024 10:25:47 +0000 (10:25 +0000)
commitcaabd859c41b50a571cfdf7747de9f245c5d531b
tree29348feae2058257acf7bafa281bb5b6a3741fec
parent6025b9135f7a8b46826a5fcf947259da43bac281
tcp: Add skb addr and sock addr to arguments of tracepoint tcp_probe.

It is useful to expose skb addr and sock addr to user in tracepoint
tcp_probe, so that we can get more information while monitoring
receiving of tcp data, by ebpf or other ways.

For example, we need to identify a packet by seq and end_seq when
calculate transmit latency between layer 2 and layer 4 by ebpf, but which is
not available in tcp_probe, so we can only use kprobe hooking
tcp_rcv_established to get them. But we can use tcp_probe directly if skb
addr and sock addr are available, which is more efficient.

Signed-off-by: fuyuanli <fuyuanli@didiglobal.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/trace/events/tcp.h