ethdev: add HIGIG2 key field to flow API
[dpdk.git] / lib / librte_ethdev / rte_flow.h
index 350566c..4fee105 100644 (file)
@@ -27,6 +27,7 @@
 #include <rte_udp.h>
 #include <rte_byteorder.h>
 #include <rte_esp.h>
+#include <rte_higig.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -484,7 +485,42 @@ enum rte_flow_item_type {
         *
         */
        RTE_FLOW_ITEM_TYPE_IGMP,
+
+       /**
+        * Matches IP Authentication Header (AH).
+        * See struct rte_flow_item_ah.
+        *
+        */
+       RTE_FLOW_ITEM_TYPE_AH,
+
+       /**
+        * Matches a HIGIG header.
+        * see struct rte_flow_item_higig2_hdr.
+        */
+       RTE_FLOW_ITEM_TYPE_HIGIG2,
+};
+
+/**
+ *
+ * RTE_FLOW_ITEM_TYPE_HIGIG2
+ * Matches higig2 header
+ */
+RTE_STD_C11
+struct rte_flow_item_higig2_hdr {
+       struct rte_higig2_hdr hdr;
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_HIGIG2. */
+#ifndef __cplusplus
+static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask = {
+       .hdr = {
+               .ppt1 = {
+                       .classification = 0xffff,
+                       .vid = 0xfff,
+               },
+       },
 };
+#endif
 
 /**
  * RTE_FLOW_ITEM_TYPE_ANY
@@ -1376,6 +1412,30 @@ static const struct rte_flow_item_igmp rte_flow_item_igmp_mask = {
 };
 #endif
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ITEM_TYPE_AH
+ *
+ * Match IP Authentication Header (AH), RFC 4302
+ *
+ */
+struct rte_flow_item_ah {
+       uint32_t next_hdr:8;
+       uint32_t payload_len:8;
+       uint32_t reserved:16;
+       uint32_t spi;
+       uint32_t seq_num;
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_AH. */
+#ifndef __cplusplus
+static const struct rte_flow_item_ah rte_flow_item_ah_mask = {
+       .spi = 0xffffffff,
+};
+#endif
+
 /**
  * Matching pattern item definition.
  *