ethdev: add PFCP header to flow API
[dpdk.git] / lib / librte_ethdev / rte_flow.h
index 5625dc4..7f3e08f 100644 (file)
@@ -520,6 +520,13 @@ enum rte_flow_item_type {
         */
        RTE_FLOW_ITEM_TYPE_L2TPV3OIP,
 
+       /**
+        * Matches PFCP Header.
+        * See struct rte_flow_item_pfcp.
+        *
+        */
+       RTE_FLOW_ITEM_TYPE_PFCP,
+
 };
 
 /**
@@ -1508,6 +1515,29 @@ static const struct rte_flow_item_ah rte_flow_item_ah_mask = {
 };
 #endif
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ITEM_TYPE_PFCP
+ *
+ * Match PFCP Header
+ */
+struct rte_flow_item_pfcp {
+       uint8_t s_field;
+       uint8_t msg_type;
+       rte_be16_t msg_len;
+       rte_be64_t seid;
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_PFCP. */
+#ifndef __cplusplus
+static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask = {
+       .s_field = 0x01,
+       .seid = RTE_BE64(0xffffffffffffffff),
+};
+#endif
+
 /**
  * Matching pattern item definition.
  *