bpf: tcp: Allow to write tp->snd_cwnd_stamp in bpf_tcp_ca
authorMiao Xu <miaxu@meta.com>
Thu, 2 May 2024 04:23:17 +0000 (21:23 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 2 May 2024 23:26:56 +0000 (16:26 -0700)
commit0325cbd21e3c26eff88bc7da303ffb46b4f5d294
tree0be09be46ced079b7b53b2b5fa528212c23daea7
parent57bfc7605ca5b102ba336779ae9adbc5bbba1d96
bpf: tcp: Allow to write tp->snd_cwnd_stamp in bpf_tcp_ca

This patch allows the write of tp->snd_cwnd_stamp in a bpf tcp
ca program. An use case of writing this field is to keep track
of the time whenever tp->snd_cwnd is raised or reduced inside
the `cong_control` callback.

Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Miao Xu <miaxu@meta.com>
Link: https://lore.kernel.org/r/20240502042318.801932-3-miaxu@meta.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
net/ipv4/bpf_tcp_ca.c