🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by bot+bpf-ci Thu, 19 Nov 2026 13:54
Re: [PATCH v7 bpf 3/5] veth: use the frame mem type when running XDP on an xdp_frame
#19174
Author: bot+bpf-ci
Date: Thu, 19 Nov 2026 13:54
57 lines
10509 bytes
--===============0493837293160669566==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

> veth: use the frame mem type when running XDP on an xdp_frame

TL;DR: Commit message only: the Fixes: tag (718a18a0c8a6) looks wrong, since
it only touches the skb path; the review suggests naming the commit that
introduced the stale rxq mem type problem.

> veth: use the frame mem type when running XDP on an xdp_frame
>
> veth_xdp_rcv_one() runs the XDP program on frames queued by
> ndo_xdp_xmit(), i.e. redirected to veth or sent back by the peer with
> XDP_TX. The xdp_buff points at rq->xdp_rxq, whose mem type is whatever
> the previous packet left there: the queue's MEM_TYPE_PAGE_SHARED, or
> the type of an earlier frame or skb. frame->mem_type is copied in only
> for XDP_TX and XDP_REDIRECT, after the program has run.
> bpf_xdp_adjust_tail() and bpf_xdp_pull_data() release whole frags with
> the rxq mem type.
[ ... ]
> Set the rxq mem type from the frame before running the program, as
> cpumap and devmap do, and drop the now redundant updates in the XDP_TX
> and XDP_REDIRECT paths.
[ ... ]
> Fixes: 718a18a0c8a6 ("veth: Rework veth_xdp_rcv_skb in order to accept non-linear skb")
> Cc: <stable@vger.kernel.org>
> Reviewed-by: Tianyi Gao <tianyi@cloudflare.com>
> Signed-off-by: Slawomir Stepien <sst@poczta.fm>

Is this Fixes: tag pointing at the right commit?

718a18a0c8a6 only reworks the skb path (veth_xdp_rcv_skb() and
veth_convert_skb_to_xdp_buff()), and does not touch veth_xdp_rcv_one(),
which is the only function this patch changes.

The stale rxq mem type on the xdp_frame path comes from the
XDP_TX/XDP_REDIRECT-only "xdp->rxq->mem = frame->mem" assignments, which
predate that commit and were added by d1396004dd86 ("veth: Add XDP TX and
REDIRECT").

The stale type only becomes harmful once frag release uses the rxq mem type,
which happened in bf25146a5595 for bpf_xdp_adjust_tail() and in 4dce1a0d7cf3
for bpf_xdp_pull_data().

Could the tag be changed to name the commit that actually introduced the
problem?


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/44535627869
--===============0493837293160669566==--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads