[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5e20044c-6057-e5c7-624b-a1373c30fc12@meta.com>
Date: Tue, 17 Jan 2023 14:07:08 -0800
From: Yonghong Song <yhs@...a.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>, bpf@...r.kernel.org
Cc: netdev@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
andrii@...nel.org, davem@...emloft.net, kuba@...nel.org,
hawk@...nel.org, pabeni@...hat.com, edumazet@...gle.com,
toke@...hat.com, memxor@...il.com, alardam@...il.com,
saeedm@...dia.com, anthony.l.nguyen@...el.com, gospo@...adcom.com,
vladimir.oltean@....com, nbd@....name, john@...ozen.org,
leon@...nel.org, simon.horman@...igine.com, aelior@...vell.com,
christophe.jaillet@...adoo.fr, ecree.xilinx@...il.com,
mst@...hat.com, bjorn@...nel.org, magnus.karlsson@...el.com,
maciej.fijalkowski@...el.com, intel-wired-lan@...ts.osuosl.org,
lorenzo.bianconi@...hat.com
Subject: Re: [RFC v2 bpf-next 3/7] xsk: add usage of XDP features flags
On 1/14/23 7:54 AM, Lorenzo Bianconi wrote:
> From: Marek Majtyka <alardam@...il.com>
>
> Change necessary condition check for XSK from ndo functions to
> xdp features flags.
>
> Signed-off-by: Marek Majtyka <alardam@...il.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
> net/xdp/xsk_buff_pool.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c
> index ed6c71826d31..2e6fa082142a 100644
> --- a/net/xdp/xsk_buff_pool.c
> +++ b/net/xdp/xsk_buff_pool.c
> @@ -178,8 +178,7 @@ int xp_assign_dev(struct xsk_buff_pool *pool,
> /* For copy-mode, we are done. */
> return 0;
>
> - if (!netdev->netdev_ops->ndo_bpf ||
> - !netdev->netdev_ops->ndo_xsk_wakeup) {
> + if ((netdev->xdp_features & NETDEV_XDP_ACT_ZC) != NETDEV_XDP_ACT_ZC) {
Maybe:
if (!(netdev->xdp_features & NETDEV_XDP_ACT_ZC))
?
> err = -EOPNOTSUPP;
> goto err_unreg_pool;
> }
Powered by blists - more mailing lists