> -----Original Message-----
> From: Paolo Abeni <[email protected]>
> Sent: Tuesday, August 4, 2026 4:09 PM
> To: Chia-Yu Chang (Nokia) <[email protected]>; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; Koen De Schepper (Nokia) 
> <[email protected]>; [email protected]; 
> [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]
> Subject: Re: [PATCH v6 net-next 1/1] tcp: Replace min_tso_segs() with 
> tso_segs() CC callback
>
>
> CAUTION: This is an external email. Please be very careful when clicking 
> links or opening attachments. See the URL nok.it/ext for additional 
> information.
>
>
>
> On 7/30/26 1:49 PM, [email protected] wrote:
> > From: Chia-Yu Chang <[email protected]>
> >
> > This patch replaces existing min_tso_segs() with tso_segs() CC
> > callback for CC algorithm to provide explicit tso segment number of
> > each data burst and overrides tcp_tso_autosize().
> >
> > This change provides below impacts on BPF struct_ops users:
> > - The callback is renamed from min_tso_segs() to tso_segs()
> > - The signature gains an extra u32 mss_now argument
> > - The return value semantics is changed from "floor value passed into
> >   tcp_tso_autosize()" to "final tso_segs value", bypassing autosizing
> >
> > As a result, BPF programs shall be updated, because returning a small
> > constant will now directly limit the final tso_segs value instead of
> > specifying the minimum value passed to tcp_tso_autosize().
> >
> > Signed-off-by: Ilpo Järvinen <[email protected]>
> > Signed-off-by: Chia-Yu Chang <[email protected]>
> > Reviewed-by: Emil Tsalapatis <[email protected]>
> Sashiko nipa has more feedback, that looks relevant to me even if it's tagged 
> not hi prio:
>
> https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260730114919.658373-1-chia-yu.chang%40nokia-bell-labs.com
>
> /P
Hi Paolo,

Thanks for the pointer and I have a look on all comments.

About the first medium comment, this is indeed an API change because we were 
asked not to introduce an additional callback.
Emil reviewed this from the BPF perspective and agreed with the approach.
I do agree that the callback comment can be documented more clearly.
So I'll clarify in v7 that implementations must handle mss_now==0, and that 
returning 0 results in the caller clamping the value to a single segment.

Regarding the second medium comment, this version does not expose 
tcp_tso_autosize() as a BPF kfunc.
The initial goal was to support in-kernel congestion control only.
If BPF maintainers think it would be useful, I will expose it as a BPF kfunc in 
a separated patch of the same series.

For the low-priority comments, I agree and will:
- Change bpf_tcp_ca_tso_segs() to return 0.
- Change EXPORT_SYMBOL() to EXPORT_SYMBOL_GPL().
- Move the READ_ONCE() into the fallback branch.

Thanks!
Chia-Yu

Reply via email to