mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bot+bpf-ci@kernel.org
To: irlanki.s@samsung.com,netdev@vger.kernel.org,bpf@vger.kernel.org,kuba@kernel.org
Cc: cpgs@samsung.com,edumazet@google.com,davem@davemloft.net,pabeni@redhat.com,ncardwell@google.com,ast@kernel.org,alexei.starovoitov@gmail.com,ameryhung@gmail.com,kuniyu@google.com,daniel@iogearbox.net,andrii@kernel.org,corbet@lwn.net,linux-kernel@vger.kernel.org,lorenzo@google.com,maze@google.com,sporeba@google.com,motomuman@google.com,madhan.raj@samsung.com,srihari.k@samsung.com,g.pokhra@samsung.com,r.kumawat@samsung.com,raj.kumars@samsung.com,ts413.lee@samsung.com,ramyashree.s@samsung.com,daeil2.hwang@samsung.com,irlanki.s@samsung.com,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v8] bpf: tcp: add ecn_init callback to bpf_tcp_ops for per-connection ECN
Date: Mon, 16 Nov 2026 14:28:37 +0000 (UTC)	[thread overview]
Message-ID: <81ad1174b88bd26130f0500e705feb4e2dc0a9f962c2ba950729846e5dc82f72@mail.kernel.org> (raw)
In-Reply-To: <20261116134652.322156-1-irlanki.s@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 1604 bytes --]

> bpf: tcp: add ecn_init callback to bpf_tcp_ops for per-connection ECN

TL;DR: Nit only: a comment in bpf_tcp_ops_get_retval() still lists
timeout_init/rwnd_init as the only bpf_get_retval() users, but ecn_init now
uses it too; the code is fine.

> diff --git a/net/ipv4/bpf_tcp_ops.c b/net/ipv4/bpf_tcp_ops.c
> --- a/net/ipv4/bpf_tcp_ops.c
> +++ b/net/ipv4/bpf_tcp_ops.c

[ ... ]

> @@ -258,7 +267,8 @@ get_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
>  		return NULL;
>  	case BPF_FUNC_get_retval:
>  		if (moff == offsetof(struct bpf_tcp_ops, timeout_init) ||
> -		    moff == offsetof(struct bpf_tcp_ops, rwnd_init))
> +		    moff == offsetof(struct bpf_tcp_ops, rwnd_init) ||
> +		    moff == offsetof(struct bpf_tcp_ops, ecn_init))
>  			return &bpf_tcp_ops_get_retval_proto;
>  		return NULL;

This isn't a bug, but bpf_get_retval() is now also exposed to ecn_init,
while the comment in bpf_tcp_ops_get_retval() still reads:

	/* bpf_get_retval() is only exposed to timeout_init/rwnd_init, which
	 * always run via bpf_tcp_ops_call_int(). ...
	 */
	if (WARN_ON_ONCE(!ctx->saved_run_ctx))

The invariant still holds, since ecn_init is only invoked through
tcp_ecn_init_bpf() -> bpf_tcp_ops_call_int(), but the comment now lists
an incomplete set of members.

Could it name ecn_init as well, or say "the int-returning *_init
members"?


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/43881864185

  reply	other threads:[~2026-11-16 14:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20261016100913epcas5p13a41d34ac5d203bff1d220b3d19dee67@epcas5p1.samsung.com>
2026-10-16 10:10 ` [PATCH net-next v7] tcp: add BPF kfuncs to set per-socket ECN mode and AccECN option Irlanki Sandeep
2026-10-16 18:03   ` Alexei Starovoitov
     [not found]     ` <CGME20261116134521epcas5p1feade37999749181544983efe729600a@epcas5p1.samsung.com>
2026-11-16 13:46       ` [PATCH bpf-next v8] bpf: tcp: add ecn_init callback to bpf_tcp_ops for per-connection ECN Irlanki Sandeep
2026-11-16 14:28         ` bot+bpf-ci [this message]
     [not found]     ` <CGME20261116151200epcas5p4218c26338b3e9580a9e232be400aecc5@epcas5p4.samsung.com>
2026-11-16 15:13       ` [PATCH bpf-next v9] " Irlanki Sandeep

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=81ad1174b88bd26130f0500e705feb4e2dc0a9f962c2ba950729846e5dc82f72@mail.kernel.org \
    --to=bot+bpf-ci@kernel.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ameryhung@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=cpgs@samsung.com \
    --cc=daeil2.hwang@samsung.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@google.com \
    --cc=g.pokhra@samsung.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=irlanki.s@samsung.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo@google.com \
    --cc=madhan.raj@samsung.com \
    --cc=martin.lau@kernel.org \
    --cc=mason@kernel.org \
    --cc=maze@google.com \
    --cc=motomuman@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=r.kumawat@samsung.com \
    --cc=raj.kumars@samsung.com \
    --cc=ramyashree.s@samsung.com \
    --cc=sporeba@google.com \
    --cc=srihari.k@samsung.com \
    --cc=ts413.lee@samsung.com \
    --cc=yonghong.song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®