From: sashiko-bot@kernel.org
To: "Slawomir Stepien" <sst@poczta.fm>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH RFC net-next v2 2/4] xdp: return status from generic_xdp_tx()
Date: Wed, 11 Nov 2026 10:20:19 +0000 [thread overview]
Message-ID: <sashiko-outbox-208776@kernel.org> (raw)
In-Reply-To: <20261110101941.1059662-3-sst@poczta.fm>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] bpf: multi-line comment style in xdp_do_generic_redirect()
--
commit 7706c10738f14b3774b96acd08e32f9887becd24
Author: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
xdp: return status from generic_xdp_tx()
This commit changes generic_xdp_tx() to return 0 when the packet or all its
validated segments are handed to the driver, or a negative errno on failure,
while keeping xdp_do_generic_redirect() returning 0.
> diff --git a/net/core/filter.c b/net/core/filter.c
> index aca8160b26a1a..b7241cbfd8f13 100644
> --- a/net/core/filter.c
> +++ b/net/core/filter.c
> @@ -4883,6 +4883,13 @@ int xdp_do_generic_redirect(struct net_device *dev, struct sk_buff *skb,
>
> skb->dev = fwd;
> _trace_xdp_redirect(dev, xdp_prog, ri->tgt_index);
> + /* generic_xdp_tx() consumes the skb: either the driver took it,
> + * or the transmit failed and generic_xdp_tx() traced the drop,
> + * counted it in the target's tx_dropped and freed the skb.
> + * Returning its error would make our caller free the skb again,
> + * so report success, as native XDP does once a frame has been
> + * handed to the target device.
> + */
> generic_xdp_tx(skb, xdp_prog, XDP_REDIRECT);
> return 0;
> }
[Severity: Low]
This isn't a bug, but BPF coding style puts the opening /* of a multi-line
comment on its own line with the comment text starting on the next line.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110101941.1059662-1-sst@poczta.fm?part=2
next prev parent reply other threads:[~2026-11-11 10:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 10:19 [PATCH RFC net-next v2 0/4] xdp: reuse generic skb XDP handling for veth Slawomir Stepien
2026-11-10 10:19 ` [PATCH RFC net-next v2 1/4] xdp: add mixed page_pool/page_shared memory type Slawomir Stepien
2026-11-10 10:19 ` [PATCH RFC net-next v2 2/4] xdp: return status from generic_xdp_tx() Slawomir Stepien
2026-11-11 10:20 ` sashiko-bot [this message]
2026-11-10 10:19 ` [PATCH RFC net-next v2 3/4] xdp: split generic XDP skb handling Slawomir Stepien
2026-11-11 10:20 ` sashiko-bot
2026-11-10 10:19 ` [PATCH RFC net-next v2 4/4] veth: use generic skb XDP handling Slawomir Stepien
2026-11-11 10:20 ` sashiko-bot
2026-11-10 12:48 ` [PATCH RFC net-next v2 0/4] xdp: reuse generic skb XDP handling for veth Maciej Fijalkowski
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=sashiko-outbox-208776@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sst@poczta.fm \
/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.