Skip to content

tcp: update TCPCB_EVER_RETRANS after trace_tcp_retransmit_skb()

Philo Lu bpf netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2tcp: move tcp_skb_cb->sacked flags to enuminclude/net/tcp.h+13 -91 replyApplied
2/2tcp: update sacked after tracepoint in __tcp_retransmit_skbnet/ipv4/tcp_output.c+6 -51 replyApplied

Reviews trailers per patch

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

PatchEric Dumazet
1/2R-b
2/2R-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 0/2] tcp: update TCPCB_EVER_RETRANS after trace_tcp_retransmit_skb()

Move TCPCB_EVER_RETRANS updating after the trace_tcp_retransmit_skb() in __tcp_retransmit_skb(), and then we are aware of whether the skb has ever been retransmitted in this tracepoint. This can be used, e.g., to get retransmission efficiency by counting skbs w/ and w/o TCPCB_EVER_RETRANS (through bpf tracing programs).

For this purpose, TCPCB_EVER_RETRANS is also needed to be exposed to bpf. Previously, the flags are defined as macros in struct tcp_skb_cb. I moved them out into a new enum, and then they can be accessed with vmlinux.h.

We have discussed to achieve this with BPF_SOCK_OPS in [0], and using tracepoint is thought to be a better solution.

[0]
https://lore.kernel.org/all/[email protected]/

Philo Lu (2):
tcp: move tcp_skb_cb->sacked flags to enum
tcp: update sacked after tracepoint in __tcp_retransmit_skb

 include/net/tcp.h     | 22 +++++++++++++---------
 net/ipv4/tcp_output.c | 11 ++++++-----
 2 files changed, 19 insertions(+), 14 deletions(-)

--
2.32.0.3.g01195cf9f