app/crypto-perf: support lookaside IPsec
[dpdk.git] / lib / ethdev / rte_flow.h
index c16f5ba..a899450 100644 (file)
@@ -33,6 +33,8 @@
 #include <rte_bitops.h>
 #include <rte_mbuf.h>
 #include <rte_mbuf_dyn.h>
+#include <rte_meter.h>
+#include <rte_gtp.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -783,8 +785,8 @@ struct rte_flow_item_eth {
 /** Default mask for RTE_FLOW_ITEM_TYPE_ETH. */
 #ifndef __cplusplus
 static const struct rte_flow_item_eth rte_flow_item_eth_mask = {
-       .hdr.d_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-       .hdr.s_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
+       .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
+       .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
        .hdr.ether_type = RTE_BE16(0x0000),
 };
 #endif
@@ -1443,15 +1445,14 @@ static const struct rte_flow_item_meta rte_flow_item_meta_mask = {
  * Matches a GTP PDU extension header with type 0x85.
  */
 struct rte_flow_item_gtp_psc {
-       uint8_t pdu_type; /**< PDU type. */
-       uint8_t qfi; /**< PPP, RQI, QoS flow identifier. */
+       struct rte_gtp_psc_generic_hdr hdr; /**< gtp psc generic hdr. */
 };
 
 /** 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 = 0xff,
+       .hdr.qfi = 0x3f,
 };
 #endif
 
@@ -1706,8 +1707,16 @@ rte_flow_item_geneve_opt_mask = {
 };
 #endif
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ITEM_TYPE_INTEGRITY
+ *
+ * Match on packet integrity check result.
+ */
 struct rte_flow_item_integrity {
-       /**< Tunnel encapsulation level the item should apply to.
+       /** Tunnel encapsulation level the item should apply to.
         * @see rte_flow_action_rss
         */
        uint32_t level;
@@ -1715,21 +1724,21 @@ struct rte_flow_item_integrity {
        union {
                __extension__
                struct {
-                       /**< The packet is valid after passing all HW checks. */
+                       /** The packet is valid after passing all HW checks. */
                        uint64_t packet_ok:1;
-                       /**< L2 layer is valid after passing all HW checks. */
+                       /** L2 layer is valid after passing all HW checks. */
                        uint64_t l2_ok:1;
-                       /**< L3 layer is valid after passing all HW checks. */
+                       /** L3 layer is valid after passing all HW checks. */
                        uint64_t l3_ok:1;
-                       /**< L4 layer is valid after passing all HW checks. */
+                       /** L4 layer is valid after passing all HW checks. */
                        uint64_t l4_ok:1;
-                       /**< L2 layer CRC is valid. */
+                       /** L2 layer CRC is valid. */
                        uint64_t l2_crc_ok:1;
-                       /**< IPv4 layer checksum is valid. */
+                       /** IPv4 layer checksum is valid. */
                        uint64_t ipv4_csum_ok:1;
-                       /**< L4 layer checksum is valid. */
+                       /** L4 layer checksum is valid. */
                        uint64_t l4_csum_ok:1;
-                       /**< The l3 length is smaller than the frame length. */
+                       /** L3 length is smaller than frame length. */
                        uint64_t l3_len_ok:1;
                        uint64_t reserved:56;
                };
@@ -2392,6 +2401,14 @@ enum rte_flow_action_type {
         * @see struct rte_flow_action_conntrack.
         */
        RTE_FLOW_ACTION_TYPE_CONNTRACK,
+
+       /**
+        * Color the packet to reflect the meter color result.
+        * Set the meter color in the mbuf to the selected color.
+        *
+        * See struct rte_flow_action_meter_color.
+        */
+       RTE_FLOW_ACTION_TYPE_METER_COLOR,
 };
 
 /**
@@ -3138,6 +3155,19 @@ struct rte_flow_modify_conntrack {
        uint32_t reserved:30;
 };
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ACTION_TYPE_METER_COLOR
+ *
+ * The meter color should be set in the packet meta-data
+ * (i.e. struct rte_mbuf::sched::color).
+ */
+struct rte_flow_action_meter_color {
+       enum rte_color color; /**< Packet color. */
+};
+
 /**
  * Field IDs for MODIFY_FIELD action.
  */
@@ -3248,7 +3278,7 @@ rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
        *RTE_FLOW_DYNF_METADATA(m) = v;
 }
 
-/*
+/**
  * Definition of a single action.
  *
  * A list of actions is terminated by a END action.