[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201204102901.109709-4-marekx.majtyka@intel.com>
Date: Fri, 4 Dec 2020 11:28:59 +0100
From: alardam@...il.com
To: magnus.karlsson@...el.com, bjorn.topel@...el.com,
andrii.nakryiko@...il.com, kuba@...nel.org, ast@...nel.org,
daniel@...earbox.net, netdev@...r.kernel.org, davem@...emloft.net,
john.fastabend@...il.com, hawk@...nel.org, toke@...hat.com
Cc: maciej.fijalkowski@...el.com, jonathan.lemon@...il.com,
bpf@...r.kernel.org, jeffrey.t.kirsher@...el.com,
maciejromanfijalkowski@...il.com, intel-wired-lan@...ts.osuosl.org,
Marek Majtyka <marekx.majtyka@...el.com>
Subject: [PATCH v2 bpf 3/5] xsk: add usage of xdp properties flags
From: Marek Majtyka <marekx.majtyka@...el.com>
Change necessary condition check for XSK from ndo functions to
xdp properties flags.
Signed-off-by: Marek Majtyka <marekx.majtyka@...el.com>
---
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 96bb607853ad..7ff82e2b2b43 100644
--- a/net/xdp/xsk_buff_pool.c
+++ b/net/xdp/xsk_buff_pool.c
@@ -158,8 +158,7 @@ static 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_properties & XDP_F_FULL_ZC) != XDP_F_FULL_ZC) {
err = -EOPNOTSUPP;
goto err_unreg_pool;
}
--
2.27.0
Powered by blists - more mailing lists