crypto/dpaa_sec: add debug prints
[dpdk.git] / lib / ethdev / rte_flow.h
index 85ab29b..765beb3 100644 (file)
@@ -37,6 +37,7 @@
 #include <rte_gtp.h>
 #include <rte_l2tpv2.h>
 #include <rte_ppp.h>
+#include <rte_gre.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -660,6 +661,13 @@ enum rte_flow_item_type {
         * See struct rte_flow_item_ppp.
         */
        RTE_FLOW_ITEM_TYPE_PPP,
+
+       /**
+        * Matches GRE optional fields.
+        *
+        * See struct rte_flow_item_gre_opt.
+        */
+       RTE_FLOW_ITEM_TYPE_GRE_OPTION,
 };
 
 /**
@@ -1195,6 +1203,17 @@ static const struct rte_flow_item_gre rte_flow_item_gre_mask = {
 };
 #endif
 
+/**
+ * RTE_FLOW_ITEM_TYPE_GRE_OPTION.
+ *
+ * Matches GRE optional fields in header.
+ */
+struct rte_flow_item_gre_opt {
+       struct rte_gre_hdr_opt_checksum_rsvd checksum_rsvd;
+       struct rte_gre_hdr_opt_key key;
+       struct rte_gre_hdr_opt_sequence sequence;
+};
+
 /**
  * RTE_FLOW_ITEM_TYPE_FUZZY
  *
@@ -2363,6 +2382,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SECURITY,
 
        /**
+        * @deprecated
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Implements OFPAT_SET_MPLS_TTL ("MPLS TTL") as defined by the
         * OpenFlow Switch Specification.
         *
@@ -2371,6 +2393,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_OF_SET_MPLS_TTL,
 
        /**
+        * @deprecated
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Implements OFPAT_DEC_MPLS_TTL ("decrement MPLS TTL") as defined
         * by the OpenFlow Switch Specification.
         *
@@ -2379,6 +2404,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_OF_DEC_MPLS_TTL,
 
        /**
+        * @deprecated
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Implements OFPAT_SET_NW_TTL ("IP TTL") as defined by the OpenFlow
         * Switch Specification.
         *
@@ -2387,6 +2415,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_OF_SET_NW_TTL,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Implements OFPAT_DEC_NW_TTL ("decrement IP TTL") as defined by
         * the OpenFlow Switch Specification.
         *
@@ -2395,6 +2426,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_OF_DEC_NW_TTL,
 
        /**
+        * @deprecated
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Implements OFPAT_COPY_TTL_OUT ("copy TTL "outwards" -- from
         * next-to-outermost to outermost") as defined by the OpenFlow
         * Switch Specification.
@@ -2404,6 +2438,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_OUT,
 
        /**
+        * @deprecated
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Implements OFPAT_COPY_TTL_IN ("copy TTL "inwards" -- from
         * outermost to next-to-outermost") as defined by the OpenFlow
         * Switch Specification.
@@ -2509,6 +2546,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_RAW_DECAP,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Modify IPv4 source address in the outermost IPv4 header.
         *
         * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV4,
@@ -2519,6 +2559,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Modify IPv4 destination address in the outermost IPv4 header.
         *
         * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV4,
@@ -2529,6 +2572,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SET_IPV4_DST,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Modify IPv6 source address in the outermost IPv6 header.
         *
         * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV6,
@@ -2539,6 +2585,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Modify IPv6 destination address in the outermost IPv6 header.
         *
         * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV6,
@@ -2549,6 +2598,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SET_IPV6_DST,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Modify source port number in the outermost TCP/UDP header.
         *
         * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_TCP
@@ -2560,6 +2612,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SET_TP_SRC,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Modify destination port number in the outermost TCP/UDP header.
         *
         * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_TCP
@@ -2582,6 +2637,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_MAC_SWAP,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Decrease TTL value directly
         *
         * No associated configuration structure.
@@ -2589,6 +2647,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_DEC_TTL,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Set TTL value
         *
         * See struct rte_flow_action_set_ttl
@@ -2596,6 +2657,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SET_TTL,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Set source MAC address from matched flow.
         *
         * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_ETH,
@@ -2606,6 +2670,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SET_MAC_SRC,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Set destination MAC address from matched flow.
         *
         * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_ETH,
@@ -2616,6 +2683,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SET_MAC_DST,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Increase sequence number in the outermost TCP header.
         *
         * Action configuration specifies the value to increase
@@ -2630,6 +2700,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Decrease sequence number in the outermost TCP header.
         *
         * Action configuration specifies the value to decrease
@@ -2644,6 +2717,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Increase acknowledgment number in the outermost TCP header.
         *
         * Action configuration specifies the value to increase
@@ -2658,6 +2734,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_INC_TCP_ACK,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Decrease acknowledgment number in the outermost TCP header.
         *
         * Action configuration specifies the value to decrease
@@ -2672,6 +2751,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Set Tag.
         *
         * Tag is for internal flow usage only and
@@ -2682,6 +2764,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SET_TAG,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Set metadata on ingress or egress path.
         *
         * See struct rte_flow_action_set_meta.
@@ -2689,6 +2774,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SET_META,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Modify IPv4 DSCP in the outermost IP header.
         *
         * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV4,
@@ -2699,6 +2787,9 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP,
 
        /**
+        * @warning This is a legacy action.
+        * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+        *
         * Modify IPv6 DSCP in the outermost IP header.
         *
         * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV6,
@@ -3069,6 +3160,9 @@ struct rte_flow_action_security {
 };
 
 /**
+ * @deprecated
+ * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+ *
  * RTE_FLOW_ACTION_TYPE_OF_SET_MPLS_TTL
  *
  * Implements OFPAT_SET_MPLS_TTL ("MPLS TTL") as defined by the OpenFlow
@@ -3079,6 +3173,9 @@ struct rte_flow_action_of_set_mpls_ttl {
 };
 
 /**
+ * @deprecated
+ * @see RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
+ *
  * RTE_FLOW_ACTION_TYPE_OF_SET_NW_TTL
  *
  * Implements OFPAT_SET_NW_TTL ("IP TTL") as defined by the OpenFlow Switch
@@ -3748,6 +3845,7 @@ enum rte_flow_error_type {
        RTE_FLOW_ERROR_TYPE_ACTION_NUM, /**< Number of actions. */
        RTE_FLOW_ERROR_TYPE_ACTION_CONF, /**< Action configuration. */
        RTE_FLOW_ERROR_TYPE_ACTION, /**< Specific action. */
+       RTE_FLOW_ERROR_TYPE_STATE, /**< Current device state. */
 };
 
 /**
@@ -3953,7 +4051,7 @@ enum rte_flow_conv_op {
  *   Perform verbose error reporting if not NULL. PMDs initialize this
  *   structure in case of error only.
  * @return
- *   0 on success, a nagative value otherwise.
+ *   0 on success, a negative value otherwise.
  */
 __rte_experimental
 int
@@ -4315,7 +4413,7 @@ rte_flow_conv(enum rte_flow_conv_op op,
  *
  * RTE_ETH_EVENT_FLOW_AGED event will be triggered when at least one new aged
  * out flow was detected after the last call to rte_flow_get_aged_flows.
- * This function can be called to get the aged flows usynchronously from the
+ * This function can be called to get the aged flows asynchronously from the
  * event callback or synchronously regardless the event.
  * This is not safe to call rte_flow_get_aged_flows function with other flow
  * functions from multiple threads simultaneously.