Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] tcp_tso_autosize is not exported as a BPF kfunc, making it impossible for custom BPF CC programs to utilize standard TSO autosizing.
--
--- Patch [1]: [PATCH v6 net-next 1/1] tcp: Replace min_tso_segs() with tso_segs() CC callback ---
commit e9e6269217c20aef163ee8ebfb7cab71f918807f
Author: Chia-Yu Chang <[email protected]>
tcp: Replace min_tso_segs() with tso_segs() CC callback
This patch replaces the existing min_tso_segs() CC callback with a new
tso_segs() callback. The new callback provides the explicit TSO segment
number for each data burst, completely bypassing tcp_tso_autosize().
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index d7c1444b5e304..d9bda3a84f261 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
[ ... ]
> @@ -2269,6 +2269,7 @@ static u32 tcp_tso_autosize(const struct sock *sk, unsigned int mss_now,
>
> return max_t(u32, bytes / mss_now, min_tso_segs);
> }
> +EXPORT_SYMBOL(tcp_tso_autosize);
[Severity: High]
Since BPF congestion control programs now need to compute the final TSO
segments value, do they need access to tcp_tso_autosize() to retain standard
autosizing?
The commit exports tcp_tso_autosize for native kernel modules, but it appears
missing from the BTF kfuncs set (bpf_tcp_ca_check_kfunc_ids) in
net/ipv4/bpf_tcp_ca.c:
BTF_KFUNCS_START(bpf_tcp_ca_check_kfunc_ids)
BTF_ID_FLAGS(func, tcp_reno_ssthresh)
BTF_ID_FLAGS(func, tcp_reno_cong_avoid)
...
BTF_KFUNCS_END(bpf_tcp_ca_check_kfunc_ids)
Without being registered here, custom BPF CC programs cannot call
tcp_tso_autosize(). This might prevent them from properly migrating to the
new tso_segs callback if they want to retain standard TSO autosizing.
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.