From: alardam@gmail.com <alardam@gmail.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH 3/8] xsk: add usage of xdp netdev_features flags
Date: Mon, 16 Nov 2020 10:34:47 +0100 [thread overview]
Message-ID: <20201116093452.7541-4-marekx.majtyka@intel.com> (raw)
In-Reply-To: <20201116093452.7541-1-marekx.majtyka@intel.com>
From: Marek Majtyka <marekx.majtyka@intel.com>
Change necessary condition check for XSK from ndo functions to
netdev_features flags.
Signed-off-by: Marek Majtyka <marekx.majtyka@intel.com>
---
net/xdp/xsk_buff_pool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c
index 8a3bf4e1318e..76922696ad3c 100644
--- a/net/xdp/xsk_buff_pool.c
+++ b/net/xdp/xsk_buff_pool.c
@@ -159,8 +159,8 @@ 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 (!(NETIF_F_XDP & netdev->features &&
+ NETIF_F_AF_XDP_ZC & netdev->features)) {
err = -EOPNOTSUPP;
goto err_unreg_pool;
}
--
2.20.1
next prev parent reply other threads:[~2020-11-16 9:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 9:34 [Intel-wired-lan] [PATCH 0/8] New netdev feature flags for XDP alardam
2020-11-16 9:34 ` [Intel-wired-lan] [PATCH 1/8] net: ethtool: extend netdev_features flag set alardam
2020-11-16 9:34 ` [Intel-wired-lan] [PATCH 2/8] drivers/net: turn XDP flags on alardam
2020-11-16 9:34 ` alardam [this message]
2020-11-16 9:34 ` [Intel-wired-lan] [PATCH 4/8] xsk: add check for full support of XDP in bind alardam
2020-11-16 9:34 ` [Intel-wired-lan] [PATCH 5/8] libbpf: extend netlink attribute API alardam
2020-11-16 9:34 ` [Intel-wired-lan] [PATCH 6/8] libbpf: add functions to get XSK modes alardam
2020-11-16 9:34 ` [Intel-wired-lan] [PATCH 7/8] libbpf: add API to get XSK/XDP caps alardam
2020-11-16 9:34 ` [Intel-wired-lan] [PATCH 8/8] samples/bpf/xdp: apply netdev XDP/XSK modes info alardam
2020-11-16 13:25 ` [Intel-wired-lan] [PATCH 0/8] New netdev feature flags for XDP Toke =?unknown-8bit?q?H=C3=B8iland-J=C3=B8rgensen?=
2020-11-17 7:37 ` Magnus Karlsson
2020-11-17 8:55 ` Marek Majtyka
2020-11-17 18:38 ` Toke =?unknown-8bit?q?H=C3=B8iland-J=C3=B8rgensen?=
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201116093452.7541-4-marekx.majtyka@intel.com \
--to=alardam@gmail.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox