[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] public/io/netif.h: add a new extra type for XDP

On 18.05.20 10:24, Denis Kirjanov wrote:
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.

For Linux the offset value is going to be passed via xenstore.

Why? I can only see disadvantages by using a different communication

Signed-off-by: Denis Kirjanov <denis.kirjanov@xxxxxxxx>
  xen/include/public/io/netif.h | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/xen/include/public/io/netif.h b/xen/include/public/io/netif.h
index 9fcf91a..759c88a 100644
--- a/xen/include/public/io/netif.h
+++ b/xen/include/public/io/netif.h
@@ -985,7 +985,8 @@ typedef struct netif_tx_request netif_tx_request_t;
  #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)
/* netif_extra_info_t flags. */
@@ -1018,6 +1019,10 @@ struct netif_extra_info {
              uint8_t algorithm;
              uint8_t value[4];
          } hash;
+        struct {
+            uint16_t headroom;
+            uint32_t pad;

Please use uint16_t pad[2] in order to avoid padding holes.

Additionally you are missing the addition of the related feature
Xenstore nodes in the comment area further up in the same file.




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.