Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] BPF API breakage: `tcp_tso_autosize` is not exposed as a BPF kfunc, making it impossible for custom BPF congestion control algorithms to correctly implement the new `tso_segs` callback.
--
--- Patch [1]: [PATCH v7 net-next 1/2] tcp: Replace min_tso_segs() with tso_segs() CC callback ---
commit c7a0bf37c3be2ea7dea45bba16c15ffe35b92e31
Author: Chia-Yu Chang <[email protected]>
tcp: Replace min_tso_segs() with tso_segs() CC callback
This commit replaces the min_tso_segs() callback in TCP congestion control
with a new tso_segs() callback. It exports tcp_tso_autosize() for use by
loadable kernel modules and updates the CC algorithms to use the new callback.
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index fcaa04e65189b..7d3e0e715c4bf 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_GPL(tcp_tso_autosize);
[Severity: High]
Since the new tso_segs callback completely bypasses the core kernel's
tcp_tso_autosize() logic, BPF congestion control algorithms must now return
the absolute final TSO segment count instead of just a minimum bound.
Although this patch exports tcp_tso_autosize() for loadable kernel modules,
is there a reason it wasn't also registered as a BPF kfunc (via BTF_ID_FLAGS)
in the kfunc registry for BPF TCP congestion control?
Without being able to call tcp_tso_autosize() from BPF programs, custom BPF
struct_ops CC algorithms cannot easily compute the autosized value. If they
return a small constant to match the old API, they might inadvertently hardcap
TSO burst size and cause severe performance regressions. Otherwise, they are
forced to redundantly reimplement complex internal kernel state logic within
BPF.
--
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.