[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb2aab4b-ba00-4b9d-ba53-5a5bb544f6fd@intel.com>
Date: Fri, 13 Dec 2024 18:31:59 +0100
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
<daniel@...earbox.net>, John Fastabend <john.fastabend@...il.com>, "Andrii
Nakryiko" <andrii@...nel.org>, Peter Zijlstra <peterz@...radead.org>, "Josh
Poimboeuf" <jpoimboe@...nel.org>, "Jose E. Marchesi"
<jose.marchesi@...cle.com>, Toke Høiland-Jørgensen
<toke@...hat.com>, Magnus Karlsson <magnus.karlsson@...el.com>, "Maciej
Fijalkowski" <maciej.fijalkowski@...el.com>, Przemek Kitszel
<przemyslaw.kitszel@...el.com>, Jason Baron <jbaron@...mai.com>, "Casey
Schaufler" <casey@...aufler-ca.com>, Nathan Chancellor <nathan@...nel.org>,
<nex.sw.ncis.osdt.itp.upstreaming@...el.com>, <bpf@...r.kernel.org>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 07/12] xsk: add generic XSk &xdp_buff -> skb
conversion
From: Jakub Kicinski <kuba@...nel.org>
Date: Thu, 12 Dec 2024 18:19:44 -0800
> On Wed, 11 Dec 2024 18:26:44 +0100 Alexander Lobakin wrote:
>> +#else /* !CONFIG_PAGE_POOL */
>> + struct napi_struct *napi;
>> +
>> + pp = NULL;
>> + napi = napi_by_id(rxq->napi_id);
>> + if (likely(napi))
>> + skb = napi_alloc_skb(napi, len);
>> + else
>> + skb = __netdev_alloc_skb_ip_align(rxq->dev, len,
>> + GFP_ATOMIC | __GFP_NOWARN);
>> + if (unlikely(!skb))
>> + return NULL;
>> +#endif /* !CONFIG_PAGE_POOL */
>
> What are the chances of having a driver with AF_XDP support
> and without page pool support? I think it's zero :S
Right, as CONFIG_BPF_SYSCALL selects PAGE_POOL if NET.
I think I wrote this when it wasn't true (before Lorenzo introduced
generic page_pools) and then just forgot to change that ._.
> Can we kill all the if !CONFIG_PAGE_POOL sections and hide
> the entire helper under if CONFIG_PAGE_POLL ?
We can. But I think I'd need to introduce a return-NULL wrapper in case
of !PAGE_POOL to satisfy the linker, as lots of drivers build their XSk
code unconditionally.
Thanks,
Olek
Powered by blists - more mailing lists