hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/include/xen/interface/io/netif.h
....@@ -161,6 +161,19 @@
161161 */
162162
163163 /*
164
+ * "xdp-headroom" is used to request that extra space is added
165
+ * for XDP processing. The value is measured in bytes and passed by
166
+ * the frontend to be consistent between both ends.
167
+ * If the value is greater than zero that means that
168
+ * an RX response is going to be passed to an XDP program for processing.
169
+ * XEN_NETIF_MAX_XDP_HEADROOM defines the maximum headroom offset in bytes
170
+ *
171
+ * "feature-xdp-headroom" is set to "1" by the netback side like other features
172
+ * so a guest can check if an XDP program can be processed.
173
+ */
174
+#define XEN_NETIF_MAX_XDP_HEADROOM 0x7FFF
175
+
176
+/*
164177 * Control ring
165178 * ============
166179 *
....@@ -846,7 +859,8 @@
846859 #define XEN_NETIF_EXTRA_TYPE_MCAST_ADD (2) /* u.mcast */
847860 #define XEN_NETIF_EXTRA_TYPE_MCAST_DEL (3) /* u.mcast */
848861 #define XEN_NETIF_EXTRA_TYPE_HASH (4) /* u.hash */
849
-#define XEN_NETIF_EXTRA_TYPE_MAX (5)
862
+#define XEN_NETIF_EXTRA_TYPE_XDP (5) /* u.xdp */
863
+#define XEN_NETIF_EXTRA_TYPE_MAX (6)
850864
851865 /* xen_netif_extra_info_t flags. */
852866 #define _XEN_NETIF_EXTRA_FLAG_MORE (0)
....@@ -879,6 +893,10 @@
879893 uint8_t algorithm;
880894 uint8_t value[4];
881895 } hash;
896
+ struct {
897
+ uint16_t headroom;
898
+ uint16_t pad[2];
899
+ } xdp;
882900 uint16_t pad[3];
883901 } u;
884902 };