All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: chia-yu.chang@nokia-bell-labs.com
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH v6 net-next 1/1] tcp: Replace min_tso_segs() with tso_segs() CC callback
Date: Fri, 31 Jul 2026 11:49:30 +0000	[thread overview]
Message-ID: <20260731114930.DEF531F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730114919.658373-1-chia-yu.chang@nokia-bell-labs.com>

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 <chia-yu.chang@nokia-bell-labs.com>

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/20260730114919.658373-1-chia-yu.chang@nokia-bell-labs.com?part=1

      reply	other threads:[~2026-07-31 11:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 11:49 [PATCH v6 net-next 1/1] tcp: Replace min_tso_segs() with tso_segs() CC callback chia-yu.chang
2026-07-31 11:49 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260731114930.DEF531F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=chia-yu.chang@nokia-bell-labs.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.