From: Denis Kirjanov <kda@linux-powerpc.org>
To: netdev@vger.kernel.org
Cc: brouer@redhat.com, jgross@suse.com, wei.liu@kernel.org,
paul@xen.org, ilias.apalodimas@linaro.org
Subject: [PATCH net-next v10 1/3] xen: netif.h: add a new extra type for XDP
Date: Mon, 22 Jun 2020 12:21:10 +0300 [thread overview]
Message-ID: <1592817672-2053-2-git-send-email-kda@linux-powerpc.org> (raw)
In-Reply-To: <1592817672-2053-1-git-send-email-kda@linux-powerpc.org>
The patch adds a new extra type to be able to diffirentiate
between RX responses on xen-netfront side with the adjusted offset
required for XDP processing.
The offset value from a guest is passed via xenstore.
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
---
include/xen/interface/io/netif.h | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/include/xen/interface/io/netif.h b/include/xen/interface/io/netif.h
index 4f20dbc..c35a5165 100644
--- a/include/xen/interface/io/netif.h
+++ b/include/xen/interface/io/netif.h
@@ -161,6 +161,17 @@
*/
/*
+ * "xdp-headroom" is used to request that extra space is added
+ * for XDP processing. The value is measured in bytes and passed by
+ * the frontend to be consistent between both ends.
+ * If the value is greater than zero that means that
+ * an RX response is going to be passed to an XDP program for processing.
+ *
+ * "feature-xdp-headroom" is set to "1" by the netback side like other features
+ * so a guest can check if an XDP program can be processed.
+ */
+
+/*
* Control ring
* ============
*
@@ -846,7 +857,8 @@ struct xen_netif_tx_request {
#define XEN_NETIF_EXTRA_TYPE_MCAST_ADD (2) /* u.mcast */
#define XEN_NETIF_EXTRA_TYPE_MCAST_DEL (3) /* u.mcast */
#define XEN_NETIF_EXTRA_TYPE_HASH (4) /* u.hash */
-#define XEN_NETIF_EXTRA_TYPE_MAX (5)
+#define XEN_NETIF_EXTRA_TYPE_XDP (5) /* u.xdp */
+#define XEN_NETIF_EXTRA_TYPE_MAX (6)
/* xen_netif_extra_info_t flags. */
#define _XEN_NETIF_EXTRA_FLAG_MORE (0)
@@ -879,6 +891,10 @@ struct xen_netif_extra_info {
uint8_t algorithm;
uint8_t value[4];
} hash;
+ struct {
+ uint16_t headroom;
+ uint16_t pad[2];
+ } xdp;
uint16_t pad[3];
} u;
};
--
1.8.3.1
next prev parent reply other threads:[~2020-06-22 9:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 9:21 [PATCH net-next v10 0/3] xen networking: add XDP support to xen-netfront Denis Kirjanov
2020-06-22 9:21 ` Denis Kirjanov [this message]
2020-06-22 9:21 ` [PATCH net-next v10 2/3] xen networking: add basic XDP support for xen-netfront Denis Kirjanov
2020-06-22 9:58 ` Jesper Dangaard Brouer
2020-06-22 12:45 ` Denis Kirjanov
2020-06-22 13:28 ` Jesper Dangaard Brouer
2020-06-22 14:27 ` Denis Kirjanov
2020-06-22 12:34 ` kernel test robot
2020-06-22 12:34 ` kernel test robot
2020-06-22 9:21 ` [PATCH net-next v10 3/3] xen networking: add XDP offset adjustment to xen-netback Denis Kirjanov
2020-06-22 10:10 ` Paul Durrant
2020-06-22 12:50 ` Denis Kirjanov
2020-06-22 14:56 ` Paul Durrant
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=1592817672-2053-2-git-send-email-kda@linux-powerpc.org \
--to=kda@linux-powerpc.org \
--cc=brouer@redhat.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jgross@suse.com \
--cc=netdev@vger.kernel.org \
--cc=paul@xen.org \
--cc=wei.liu@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.