From: sashiko-bot@kernel.org
To: "Kuniyuki Iwashima" <kuniyu@google.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH v3 bpf-next 2/9] bpf: tcp: Add a new per-socket flag and kfunc for bpf_tcp_ops.
Date: Mon, 05 Oct 2026 15:55:14 +0000 [thread overview]
Message-ID: <20261005155514.C05E81F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261005154533.4147685-3-kuniyu@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] tcp: missing documentation update for tcp_sock cacheline
--
commit a581d0e37015bf601147a1857ac83871b8f4eae9
Author: Kuniyuki Iwashima <kuniyu@google.com>
bpf: tcp: Add a new per-socket flag and kfunc for bpf_tcp_ops.
This commit introduces a new per-socket flag field, bpf_tcp_ops_flags, to
struct tcp_sock to avoid the overhead of the legacy SOCK_OPS approach and
support fast-path callbacks. It also adds a new kfunc,
bpf_tcp_ops_set_flags, allowing BPF programs to atomically enable or disable
these flags. The new field is placed within the tcp_sock_read_txrx cacheline
group.
Link: https://lore.kernel.org/netdev/CAMB2axMwBuz3X4Uwn5uzZUqm91EbiMnbQX832wUFOQ44fOwDnQ@mail.gmail.com/
> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
> --- a/include/linux/tcp.h
> +++ b/include/linux/tcp.h
[ ... ]
> @@ -233,6 +233,13 @@ struct tcp_sock {
> is_sack_reneg:1, /* in recovery from loss with SACK reneg? */
> is_cwnd_limited:1,/* forward progress limited by snd_cwnd? */
> recvmsg_inq : 1;/* Indicate # of bytes in queue upon recvmsg */
> +#ifdef CONFIG_BPF
> + u32 bpf_tcp_ops_flags;
[Severity: Low]
This isn't a functional bug, but should
Documentation/networking/net_cachelines/tcp_sock.rst be updated to reflect
the addition of the bpf_tcp_ops_flags field to the tcp_sock_read_txrx
cacheline group?
The tcp_sock structure header explicitly mentions that the document should be
updated when adding new fields.
> +#define BPF_TCP_OPS_TEST_FLAG(TP, ARG) \
> + (READ_ONCE((TP)->bpf_tcp_ops_flags) & BPF_TCP_OPS_FLAG_ ## ARG)
> +#else
> +#define BPF_TCP_OPS_TEST_FLAG(TP, ARG) (0)
> +#endif
> __cacheline_group_end(tcp_sock_read_txrx);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261005154533.4147685-1-kuniyu@google.com?part=2
next prev parent reply other threads:[~2026-10-05 15:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 15:40 [PATCH v3 bpf-next 0/9] bpf: Add bpf_tcp_ops hooks for TCP AutoLOWAT Kuniyuki Iwashima
2026-10-05 15:40 ` [PATCH v3 bpf-next 1/9] bpf: tcp: Convert deny-list for bpf_{get,set}sockopt() to allow-list Kuniyuki Iwashima
2026-10-05 15:40 ` [PATCH v3 bpf-next 2/9] bpf: tcp: Add a new per-socket flag and kfunc for bpf_tcp_ops Kuniyuki Iwashima
2026-10-05 15:55 ` sashiko-bot [this message]
2026-10-05 16:27 ` bot+bpf-ci
2026-10-05 17:26 ` Kuniyuki Iwashima
2026-10-05 18:30 ` Stanislav Fomichev
2026-10-05 18:37 ` Kuniyuki Iwashima
2026-10-05 22:47 ` Stanislav Fomichev
2026-10-05 23:31 ` Kuniyuki Iwashima
2026-10-05 21:19 ` Amery Hung
2026-10-05 21:23 ` Kuniyuki Iwashima
2026-10-05 15:40 ` [PATCH v3 bpf-next 3/9] selftest: bpf: Use bpf_tcp_ops_set_flags() in bpf_tcp_ops_hdr.c Kuniyuki Iwashima
2026-10-05 15:40 ` [PATCH v3 bpf-next 4/9] bpf: tcp: Guard fast-path bpf_tcp_ops_call() under per-socket flag Kuniyuki Iwashima
2026-10-05 16:27 ` bot+bpf-ci
2026-10-05 19:10 ` Amery Hung
2026-10-05 19:13 ` Kuniyuki Iwashima
2026-10-05 15:40 ` [PATCH v3 bpf-next 5/9] bpf: tcp: Introduce bpf_tcp_ops.{enqueue,dequeue}_rcvq() Kuniyuki Iwashima
2026-10-05 15:40 ` [PATCH v3 bpf-next 6/9] tcp: Split out __tcp_set_rcvlowat() Kuniyuki Iwashima
2026-10-05 15:40 ` [PATCH v3 bpf-next 7/9] bpf: mptcp: Don't support BPF_TCP_OPS_FLAG_RCVQ Kuniyuki Iwashima
2026-10-05 15:40 ` [PATCH v3 bpf-next 8/9] bpf: tcp: Add kfunc to adjust sk->sk_rcvlowat Kuniyuki Iwashima
2026-10-05 15:40 ` [PATCH v3 bpf-next 9/9] selftest: bpf: Add test for bpf_tcp_ops.{enqueue,dequeue}_rcvq() Kuniyuki Iwashima
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=20261005155514.C05E81F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=kuniyu@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox