tcp: Add new args for cong_control in tcp_congestion_ops
authorMiao Xu <miaxu@meta.com>
Thu, 2 May 2024 04:23:16 +0000 (21:23 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 2 May 2024 23:26:56 +0000 (16:26 -0700)
commit57bfc7605ca5b102ba336779ae9adbc5bbba1d96
tree64660f733da0fc7270741e7822326c6c705e03fa
parentf8c423d1ca4f4f4224bb6ca486478b7f51a91701
tcp: Add new args for cong_control in tcp_congestion_ops

This patch adds two new arguments for cong_control of struct
tcp_congestion_ops:
 - ack
 - flag
These two arguments are inherited from the caller tcp_cong_control in
tcp_intput.c. One use case of them is to update cwnd and pacing rate
inside cong_control based on the info they provide. For example, the
flag can be used to decide if it is the right time to raise or reduce a
sender's cwnd.

Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Miao Xu <miaxu@meta.com>
Link: https://lore.kernel.org/r/20240502042318.801932-2-miaxu@meta.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
include/net/tcp.h
net/ipv4/bpf_tcp_ca.c
net/ipv4/tcp_bbr.c
net/ipv4/tcp_input.c
tools/testing/selftests/bpf/progs/tcp_ca_kfunc.c