From: sashiko-bot@kernel.org
To: "Jamal Hadi Salim" <jhs@mojatatu.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net] net/sched: cls_bpf: accept dev-bound programs on shared blocks
Date: Mon, 05 Oct 2026 08:21:33 +0000 [thread overview]
Message-ID: <20261005082133.8B8D31F00893@smtp.kernel.org> (raw)
In-Reply-To: <QDISC-PYC7.v1.20261003103747@mojatatu.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] bpf: multi-line comment style violation in cls_bpf.c
--
commit 335af23f9a1d13cab5f84cecaf4fd5a4dda63d7f
Author: Jamal Hadi Salim <jhs@mojatatu.com>
net/sched: cls_bpf: accept dev-bound programs on shared blocks
This commit allows device-bound programs to be attached through shared blocks
by ensuring the program matches every netdev bound to the block. Prior to
this, attaching to a shared block would incorrectly return -EINVAL because the
block's qdisc is NULL.
Link: https://lore.kernel.org/netdev/20260809094418.901607-1-jhs@mojatatu.com/
> diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
> index 188cf0f949dd4..6a54f8a7b8218 100644
> --- a/net/sched/cls_bpf.c
> +++ b/net/sched/cls_bpf.c
> @@ -392,9 +392,29 @@ static int cls_bpf_prog_from_efd(struct nlattr **tb, struct cls_bpf_prog *prog,
> if (bpf_prog_is_dev_bound(fp->aux)) {
> struct tcf_block *block = tp->chain->block;
> struct net_device *dev;
> -
> - dev = block->q ? qdisc_dev(block->q) : NULL;
> - if (!dev || !bpf_offload_dev_match(fp, dev)) {
> + unsigned long ifindex;
> + bool found = false;
> + bool match = false;
> +
> + /* A shared block has no qdisc (block->q == NULL) but may
> + * bind several netdevs; the program is offloaded to all of
> + * them, so it must match all of them.
> + */
[Severity: Low]
This isn't a bug, but does this multi-line comment follow the documented BPF
subsystem coding style? The BPF subsystem expects the opening "/*" to be on
its own line, rather than having text on the same line as the opening.
--
Sashiko AI review · https://sashiko.dev/#/patchset/QDISC-PYC7.v1.20261003103747@mojatatu.com?part=1
next prev parent reply other threads:[~2026-10-05 8:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 8:21 [PATCH net] net/sched: cls_bpf: accept dev-bound programs on shared blocks Jamal Hadi Salim
2026-10-05 8:21 ` sashiko-bot [this message]
2026-10-05 8:57 ` netdev-bot+sashiko
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=20261005082133.8B8D31F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=jhs@mojatatu.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