From: sashiko-bot@kernel.org
To: "Maciej Fijalkowski" <maciej.fijalkowski@intel.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH RFC net-next 4/4] veth: use generic skb XDP handling
Date: Fri, 30 Oct 2026 04:54:11 +0000 [thread overview]
Message-ID: <sashiko-outbox-190419@kernel.org> (raw)
In-Reply-To: <20260509084858.773921-5-maciej.fijalkowski@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing statistic accounting for skb-backed XDP_TX failures.
--
commit 3f79161429d884ed3854644cf3a7b111ce3c40fa
Author: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
veth: use generic skb XDP handling
This commit transitions veth to use the generic skb XDP helper for skb-backed
packets. It routes XDP_REDIRECT and XDP_TX through the generic paths while
retaining the existing veth xdp_frame path for packets arriving as frames.
> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> --- a/drivers/net/veth.c
> +++ b/drivers/net/veth.c
[ ... ]
> @@ -808,94 +764,33 @@ static struct sk_buff *veth_xdp_rcv_skb(struct veth_rq *rq,
> goto out;
> }
>
> + ret = __do_xdp_generic(xdp_prog, &skb, &ctx);
> + switch (ctx.act) {
> case XDP_PASS:
> break;
> case XDP_TX:
> + if (!ctx.err)
> + stats->xdp_skb_tx++;
Should there be an else branch here to increment stats->xdp_tx_err?
It looks like if the generic XDP_TX fails and ctx.err is non-zero, the
failure is not recorded in the local stats structure.
[ ... ]
> @@ -947,7 +842,9 @@ static int veth_xdp_rcv(struct veth_rq *rq, int budget,
>
> u64_stats_update_begin(&rq->stats.syncp);
> rq->stats.vs.xdp_redirect += stats->xdp_redirect;
> + rq->stats.vs.xdp_tx += stats->xdp_skb_tx;
> rq->stats.vs.xdp_bytes += stats->xdp_bytes;
> + rq->stats.vs.xdp_tx_err += stats->xdp_tx_err;
This aggregation was added to collect the errors, but since stats->xdp_tx_err
is never incremented in veth_xdp_rcv_skb(), are the skb-backed XDP_TX errors
entirely missing from veth's private ethtool statistics?
If the local increment was intentionally omitted to prevent double-counting in
the global dev_core_stats->tx_dropped (which generic_xdp_tx() increments),
does adding this aggregation line leave the ethtool stats inconsistent by
only tracking xdp_frame drops?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260509084858.773921-1-maciej.fijalkowski@intel.com?part=4
next prev parent reply other threads:[~2026-10-30 4:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-09 8:48 [PATCH RFC net-next 0/4] xdp: reuse generic skb XDP handling for veth Maciej Fijalkowski
2026-05-09 8:48 ` [PATCH RFC net-next 1/4] xdp: add mixed page_pool/page_shared memory type Maciej Fijalkowski
2026-05-09 8:48 ` [PATCH RFC net-next 2/4] xdp: return status from generic_xdp_tx() Maciej Fijalkowski
2026-05-12 12:57 ` Björn Töpel
2026-05-12 17:13 ` Maciej Fijalkowski
2026-05-09 8:48 ` [PATCH RFC net-next 3/4] xdp: split generic XDP skb handling Maciej Fijalkowski
2026-05-09 8:48 ` [PATCH RFC net-next 4/4] veth: use generic skb XDP handling Maciej Fijalkowski
2026-05-12 14:32 ` Björn Töpel
2026-05-12 17:06 ` Maciej Fijalkowski
2026-05-13 11:31 ` Björn Töpel
2026-10-30 4:54 ` sashiko-bot [this message]
2026-05-12 12:55 ` [PATCH RFC net-next 0/4] xdp: reuse generic skb XDP handling for veth Björn Töpel
2026-05-12 17:12 ` Maciej Fijalkowski
2026-05-14 5:13 ` Jesper Dangaard Brouer
2026-05-15 18:18 ` Maciej Fijalkowski
2026-05-28 13:24 ` Maciej Fijalkowski
2026-05-15 0:54 ` Jakub Kicinski
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-190419@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=maciej.fijalkowski@intel.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