ethdev: add GTP extension header to flow API
[dpdk.git] / lib / librte_ethdev / rte_flow.h
index 354cb1d..eab87a5 100644 (file)
@@ -434,6 +434,15 @@ enum rte_flow_item_type {
         * @code rte_be32_t * @endcode
         */
        RTE_FLOW_ITEM_TYPE_GRE_KEY,
+
+       /**
+        * Matches a GTP extension header: PDU session container.
+        *
+        * Configure flow for GTP packets with extension header type 0x85.
+        *
+        * See struct rte_flow_item_gtp_psc.
+        */
+       RTE_FLOW_ITEM_TYPE_GTP_PSC,
 };
 
 /**
@@ -1192,6 +1201,24 @@ static const struct rte_flow_item_meta rte_flow_item_meta_mask = {
 };
 #endif
 
+/**
+ * RTE_FLOW_ITEM_TYPE_GTP_PSC.
+ *
+ * Matches a GTP PDU extension header with type 0x85.
+ */
+struct rte_flow_item_gtp_psc {
+       uint8_t pdu_type; /**< PDU type. */
+       uint8_t qfi; /**< QoS flow identifier. */
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_GTP_PSC. */
+#ifndef __cplusplus
+static const struct rte_flow_item_gtp_psc
+rte_flow_item_gtp_psc_mask = {
+       .qfi = 0x3f,
+};
+#endif
+
 /**
  * @warning
  * @b EXPERIMENTAL: this structure may change without prior notice