ethdev: add eCPRI key fields to flow API
[dpdk.git] / lib / librte_ethdev / rte_flow.h
index b0e4199..da8bfa5 100644 (file)
@@ -28,6 +28,7 @@
 #include <rte_byteorder.h>
 #include <rte_esp.h>
 #include <rte_higig.h>
+#include <rte_ecpri.h>
 #include <rte_mbuf.h>
 #include <rte_mbuf_dyn.h>
 
@@ -527,6 +528,15 @@ enum rte_flow_item_type {
         */
        RTE_FLOW_ITEM_TYPE_PFCP,
 
+       /**
+        * Matches eCPRI Header.
+        *
+        * Configure flow for eCPRI over ETH or UDP packets.
+        *
+        * See struct rte_flow_item_ecpri.
+        */
+       RTE_FLOW_ITEM_TYPE_ECPRI,
+
 };
 
 /**
@@ -1546,6 +1556,29 @@ static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask = {
 };
 #endif
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ITEM_TYPE_ECPRI
+ *
+ * Match eCPRI Header
+ */
+struct rte_flow_item_ecpri {
+       struct rte_ecpri_combined_msg_hdr hdr;
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_ECPRI. */
+#ifndef __cplusplus
+static const struct rte_flow_item_ecpri rte_flow_item_ecpri_mask = {
+       .hdr = {
+               .common = {
+                       .u32 = 0x0,
+               },
+       },
+};
+#endif
+
 /**
  * Matching pattern item definition.
  *