[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251021180136.39431ed3@kernel.org>
Date: Tue, 21 Oct 2025 18:01:36 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Cc: Alexander Lobakin <aleksander.lobakin@...el.com>, Jesper Dangaard Brouer
<hawk@...nel.org>, <bpf@...r.kernel.org>, <ast@...nel.org>,
<daniel@...earbox.net>, <ilias.apalodimas@...aro.org>, <toke@...hat.com>,
<lorenzo@...nel.org>, <netdev@...r.kernel.org>,
<magnus.karlsson@...el.com>, <andrii@...nel.org>, <stfomichev@...il.com>,
<syzbot+ff145014d6b0ce64a173@...kaller.appspotmail.com>, Ihor Solodrai
<ihor.solodrai@...ux.dev>, Octavian Purdila <tavip@...gle.com>
Subject: Re: [PATCH v2 bpf 1/2] xdp: update xdp_rxq_info's mem type in XDP
generic hook
On Mon, 20 Oct 2025 19:53:26 +0200 Maciej Fijalkowski wrote:
> > > The SKB should be marked via skb->pp_recycle, but I guess you are trying
> > > to catch code that doesn't set this correctly?
> > > (Slightly worried this will "paper-over" some other buggy code?)
> > >
> > >> + xdp->rxq->mem.type = page_pool_page_is_pp(virt_to_page(xdp->data)) ?
> >
> > BTW this may return incorrect results if the page is not order-0.
> > IIRC system PPs always return order-0 pages, what about veth code etc?
>
> veth's pp works on order-0 pages well, however I agree it would be better
> to use virt_to_head_page() here.
In this case the mem.type update is for consuming frags only, right?
We can't free the head itself since the skb is attached to it.
So running the predicates on xdp->data is probably wrong.
Is it possible to get to bpf_prog_run_generic_xdp() (with frags)
and without going thru netif_skb_check_for_xdp() ? If no then
frags must have come from skb_pp_cow().
And the type is always MEM_TYPE_PAGE_POOL ?
Powered by blists - more mailing lists