From: sashiko-bot@kernel.org
To: "Vladimir Oltean" <vladimir.oltean@nxp.com>
Cc: virtualization@lists.linux.dev,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net 1/2] net: pass the XDP action to generic_xdp_tx() for tracing
Date: Sat, 31 Oct 2026 11:48:08 +0000 [thread overview]
Message-ID: <sashiko-outbox-191925@kernel.org> (raw)
In-Reply-To: <20261030114753.185281-1-vladimir.oltean@nxp.com>
> When generic_xdp_tx() fails to transmit an skb, it reports the drop
> through trace_xdp_exception() with the action hardcoded to XDP_TX.
> That was right when generic XDP was added, and XDP_TX was the only
> caller. Since then, two XDP_REDIRECT paths have started to transmit
> through generic_xdp_tx() as well:
>
> - xdp_do_generic_redirect(), for a redirect to an ifindex
> - dev_map_generic_redirect(), for DEVMAP and DEVMAP_HASH redirects,
> including broadcast
>
> Drops on those paths are reported as XDP_TX, an action which the
> program never returned. Tools which count xdp:xdp_exception events per
> action, such as the samples/bpf programs built on xdp_sample, therefore
> attribute generic XDP redirect drops to the wrong action. Drivers with
> native XDP already report XDP_TX and XDP_REDIRECT drops separately.
>
> Add an "act" argument to generic_xdp_tx(), and have each caller pass
> the action that led to the transmission: XDP_TX from do_xdp_generic(),
> XDP_REDIRECT from the two redirect paths. generic_xdp_tx() is not
> exported, so these are all of its users.
>
> Fixes: 6103aa96ec07 ("net: implement XDP_REDIRECT for xdp generic")
> Fixes: 6d5fc1957989 ("xdp: Fix handling of devmap in generic XDP")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261030114753.185281-1-vladimir.oltean@nxp.com?part=1
next prev parent reply other threads:[~2026-10-31 11:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 11:47 [PATCH net 1/2] net: pass the XDP action to generic_xdp_tx() for tracing Vladimir Oltean
2026-10-30 11:47 ` [PATCH net 2/2] net: validate xmit skbs in generic_xdp_tx() Vladimir Oltean
2026-10-31 11:48 ` sashiko-bot
2026-11-03 11:39 ` Vladimir Oltean
2026-11-05 13:31 ` Simon Horman
2026-11-05 13:50 ` Vladimir Oltean
2026-11-03 12:24 ` netdev-bot+sashiko
2026-10-31 11:48 ` sashiko-bot [this message]
2026-11-05 13:23 ` [PATCH net 1/2] net: pass the XDP action to generic_xdp_tx() for tracing Simon Horman
2026-11-10 17:40 ` patchwork-bot+netdevbpf
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-191925@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
--cc=vladimir.oltean@nxp.com \
/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