netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] tcp: update TCPCB_EVER_RETRANS after trace_tcp_retransmit_skb()
@ 2024-04-21  4:20 Philo Lu
  2024-04-21  4:20 ` [PATCH net-next 1/2] tcp: move tcp_skb_cb->sacked flags to enum Philo Lu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Philo Lu @ 2024-04-21  4:20 UTC (permalink / raw)
  To: netdev, bpf
  Cc: edumazet, davem, martin.lau, ast, daniel, andrii, kuba, pabeni,
	dsahern, xuanzhuo, fred.cc

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/20240417124622.35333-1-lulie@linux.alibaba.com/

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


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

end of thread, other threads:[~2024-04-25  8:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-21  4:20 [PATCH net-next 0/2] tcp: update TCPCB_EVER_RETRANS after trace_tcp_retransmit_skb() Philo Lu
2024-04-21  4:20 ` [PATCH net-next 1/2] tcp: move tcp_skb_cb->sacked flags to enum Philo Lu
2024-04-25  6:22   ` Eric Dumazet
2024-04-21  4:20 ` [PATCH net-next 2/2] tcp: update sacked after tracepoint in __tcp_retransmit_skb Philo Lu
2024-04-25  6:25   ` Eric Dumazet
2024-04-25  8:00 ` [PATCH net-next 0/2] tcp: update TCPCB_EVER_RETRANS after trace_tcp_retransmit_skb() patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).