net/vmxnet3: support RETA query and update
[dpdk.git] / lib / ethdev / rte_flow.h
index ba069f2..d8827dd 100644 (file)
 #include <rte_mbuf_dyn.h>
 #include <rte_meter.h>
 #include <rte_gtp.h>
+#include <rte_l2tpv2.h>
+#include <rte_ppp.h>
+#include <rte_gre.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+#define RTE_FLOW_LOG(level, ...) \
+       rte_log(RTE_LOG_ ## level, rte_eth_dev_logtype, "" __VA_ARGS__)
+
 /**
  * Flow rule attributes.
  *
@@ -644,6 +650,27 @@ enum rte_flow_item_type {
         * @see struct rte_flow_item_flex.
         */
        RTE_FLOW_ITEM_TYPE_FLEX,
+
+       /**
+        * Matches L2TPv2 Header.
+        *
+        * See struct rte_flow_item_l2tpv2.
+        */
+       RTE_FLOW_ITEM_TYPE_L2TPV2,
+
+       /**
+        * Matches PPP Header.
+        *
+        * 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,
 };
 
 /**
@@ -901,8 +928,8 @@ struct rte_flow_item_vlan {
                };
                struct rte_vlan_hdr hdr;
        };
+       /** Packet header contains at least one more VLAN, after this VLAN. */
        uint32_t has_more_vlan:1;
-       /**< Packet header contains at least one more VLAN, after this VLAN. */
        uint32_t reserved:31; /**< Reserved, must be zero. */
 };
 
@@ -944,26 +971,26 @@ static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask = {
  */
 struct rte_flow_item_ipv6 {
        struct rte_ipv6_hdr hdr; /**< IPv6 header definition. */
+       /** Header contains Hop-by-Hop Options extension header. */
        uint32_t has_hop_ext:1;
-       /**< Header contains Hop-by-Hop Options extension header. */
+       /** Header contains Routing extension header. */
        uint32_t has_route_ext:1;
-       /**< Header contains Routing extension header. */
+       /** Header contains Fragment extension header. */
        uint32_t has_frag_ext:1;
-       /**< Header contains Fragment extension header. */
+       /** Header contains Authentication extension header. */
        uint32_t has_auth_ext:1;
-       /**< Header contains Authentication extension header. */
+       /** Header contains Encapsulation Security Payload extension header. */
        uint32_t has_esp_ext:1;
-       /**< Header contains Encapsulation Security Payload extension header. */
+       /** Header contains Destination Options extension header. */
        uint32_t has_dest_ext:1;
-       /**< Header contains Destination Options extension header. */
+       /** Header contains Mobility extension header. */
        uint32_t has_mobil_ext:1;
-       /**< Header contains Mobility extension header. */
+       /** Header contains Host Identity Protocol extension header. */
        uint32_t has_hip_ext:1;
-       /**< Header contains Host Identity Protocol extension header. */
+       /** Header contains Shim6 Protocol extension header. */
        uint32_t has_shim6_ext:1;
-       /**< Header contains Shim6 Protocol extension header. */
+       /** Reserved for future extension headers, must be zero. */
        uint32_t reserved:23;
-       /**< Reserved for future extension headers, must be zero. */
 };
 
 /** Default mask for RTE_FLOW_ITEM_TYPE_IPV6. */
@@ -1179,6 +1206,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
  *
@@ -1504,11 +1542,12 @@ rte_flow_item_icmp6_nd_opt_tla_eth_mask = {
  * RTE_FLOW_ITEM_TYPE_META
  *
  * Matches a specified metadata value. On egress, metadata can be set
- * either by mbuf dynamic metadata field with PKT_TX_DYNF_METADATA flag or
- * RTE_FLOW_ACTION_TYPE_SET_META. On ingress, RTE_FLOW_ACTION_TYPE_SET_META
+ * either by mbuf dynamic metadata field with RTE_MBUF_DYNFLAG_TX_METADATA flag
+ * or RTE_FLOW_ACTION_TYPE_SET_META. On ingress, RTE_FLOW_ACTION_TYPE_SET_META
  * sets metadata for a packet and the metadata will be reported via mbuf
- * metadata dynamic field with PKT_RX_DYNF_METADATA flag. The dynamic mbuf
- * field must be registered in advance by rte_flow_dynf_metadata_register().
+ * metadata dynamic field with RTE_MBUF_DYNFLAG_RX_METADATA flag. The dynamic
+ * mbuf field must be registered in advance by
+ * rte_flow_dynf_metadata_register().
  */
 struct rte_flow_item_meta {
        uint32_t data;
@@ -1900,6 +1939,57 @@ static const struct rte_flow_item_ethdev rte_flow_item_ethdev_mask = {
 };
 #endif
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ITEM_TYPE_L2TPV2
+ *
+ * Matches L2TPv2 Header
+ */
+struct rte_flow_item_l2tpv2 {
+       struct rte_l2tpv2_combined_msg_hdr hdr;
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_L2TPV2. */
+#ifndef __cplusplus
+static const struct rte_flow_item_l2tpv2 rte_flow_item_l2tpv2_mask = {
+       /*
+        * flags and version bit mask
+        * 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
+        * T L x x S x O P x x x x V V V V
+        */
+       .hdr = {
+               .common = {
+                       .flags_version = RTE_BE16(0xcb0f),
+               },
+       },
+};
+#endif
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ITEM_TYPE_PPP
+ *
+ * Matches PPP Header
+ */
+struct rte_flow_item_ppp {
+       struct rte_ppp_hdr hdr;
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_PPP. */
+#ifndef __cplusplus
+static const struct rte_flow_item_ppp rte_flow_item_ppp_mask = {
+       .hdr = {
+               .addr = 0xff,
+               .ctrl = 0xff,
+               .proto_id = RTE_BE16(0xffff),
+       }
+};
+#endif
+
 /**
  * Matching pattern item definition.
  *
@@ -2172,8 +2262,8 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_JUMP,
 
        /**
-        * Attaches an integer value to packets and sets PKT_RX_FDIR and
-        * PKT_RX_FDIR_ID mbuf flags.
+        * Attaches an integer value to packets and sets RTE_MBUF_F_RX_FDIR and
+        * RTE_MBUF_F_RX_FDIR_ID mbuf flags.
         *
         * See struct rte_flow_action_mark.
         *
@@ -2185,7 +2275,7 @@ enum rte_flow_action_type {
 
        /**
         * Flags packets. Similar to MARK without a specific value; only
-        * sets the PKT_RX_FDIR mbuf flag.
+        * sets the RTE_MBUF_F_RX_FDIR mbuf flag.
         *
         * No associated configuration structure.
         *
@@ -2295,6 +2385,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.
         *
@@ -2303,6 +2396,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.
         *
@@ -2311,6 +2407,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.
         *
@@ -2319,6 +2418,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.
         *
@@ -2327,6 +2429,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.
@@ -2336,6 +2441,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.
@@ -2361,7 +2469,7 @@ enum rte_flow_action_type {
        RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN,
 
        /**
-        * Implements OFPAT_SET_VLAN_VID ("set the 802.1q VLAN id") as
+        * Implements OFPAT_SET_VLAN_VID ("set the 802.1q VLAN ID") as
         * defined by the OpenFlow Switch Specification.
         *
         * See struct rte_flow_action_of_set_vlan_vid.
@@ -2441,6 +2549,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,
@@ -2451,6 +2562,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,
@@ -2461,6 +2575,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,
@@ -2471,6 +2588,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,
@@ -2481,6 +2601,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
@@ -2492,6 +2615,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
@@ -2514,6 +2640,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.
@@ -2521,6 +2650,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
@@ -2528,6 +2660,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,
@@ -2538,6 +2673,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,
@@ -2548,6 +2686,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
@@ -2562,6 +2703,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
@@ -2576,6 +2720,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
@@ -2590,6 +2737,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
@@ -2604,6 +2754,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
@@ -2614,6 +2767,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.
@@ -2621,6 +2777,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,
@@ -2631,6 +2790,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,
@@ -2725,8 +2887,8 @@ enum rte_flow_action_type {
 /**
  * RTE_FLOW_ACTION_TYPE_MARK
  *
- * Attaches an integer value to packets and sets PKT_RX_FDIR and
- * PKT_RX_FDIR_ID mbuf flags.
+ * Attaches an integer value to packets and sets RTE_MBUF_F_RX_FDIR and
+ * RTE_MBUF_F_RX_FDIR_ID mbuf flags.
  *
  * This value is arbitrary and application-defined. Maximum allowed value
  * depends on the underlying implementation. It is returned in the
@@ -2777,8 +2939,8 @@ struct rte_flow_action_queue {
 struct rte_flow_action_age {
        uint32_t timeout:24; /**< Time in seconds. */
        uint32_t reserved:8; /**< Reserved, must be zero. */
+       /** The user flow context, NULL means the rte_flow pointer. */
        void *context;
-               /**< The user flow context, NULL means the rte_flow pointer. */
 };
 
 /**
@@ -2790,8 +2952,8 @@ struct rte_flow_action_age {
 struct rte_flow_query_age {
        uint32_t reserved:6; /**< Reserved, must be zero. */
        uint32_t aged:1; /**< 1 if aging timeout expired, 0 otherwise. */
+       /** sec_since_last_hit value is valid. */
        uint32_t sec_since_last_hit_valid:1;
-       /**< sec_since_last_hit value is valid. */
        uint32_t sec_since_last_hit:24; /**< Seconds since last traffic hit. */
 };
 
@@ -2804,12 +2966,12 @@ struct rte_flow_query_age {
  * Adds a counter action to a matched flow.
  *
  * If more than one count action is specified in a single flow rule, then each
- * action must specify a unique id.
+ * action must specify a unique ID.
  *
  * Counters can be retrieved and reset through ``rte_flow_query()``, see
  * ``struct rte_flow_query_count``.
  *
- * For ports within the same switch domain then the counter id namespace extends
+ * For ports within the same switch domain then the counter ID namespace extends
  * to all ports within that switch domain.
  */
 struct rte_flow_action_count {
@@ -2890,7 +3052,7 @@ struct rte_flow_action_rss {
         * through.
         */
        uint32_t level;
-       uint64_t types; /**< Specific RSS hash types (see ETH_RSS_*). */
+       uint64_t types; /**< Specific RSS hash types (see RTE_ETH_RSS_*). */
        uint32_t key_len; /**< Hash key length in bytes. */
        uint32_t queue_num; /**< Number of entries in @p queue. */
        const uint8_t *key; /**< Hash key. */
@@ -3001,6 +3163,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
@@ -3011,6 +3176,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
@@ -3033,11 +3201,11 @@ struct rte_flow_action_of_push_vlan {
 /**
  * RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID
  *
- * Implements OFPAT_SET_VLAN_VID ("set the 802.1q VLAN id") as defined by
+ * Implements OFPAT_SET_VLAN_VID ("set the 802.1q VLAN ID") as defined by
  * the OpenFlow Switch Specification.
  */
 struct rte_flow_action_of_set_vlan_vid {
-       rte_be16_t vlan_vid; /**< VLAN id. */
+       rte_be16_t vlan_vid; /**< VLAN ID. */
 };
 
 /**
@@ -3269,10 +3437,10 @@ struct rte_flow_action_set_tag {
  * RTE_FLOW_ACTION_TYPE_SET_META
  *
  * Set metadata. Metadata set by mbuf metadata dynamic field with
- * PKT_TX_DYNF_DATA flag on egress will be overridden by this action. On
- * ingress, the metadata will be carried by mbuf metadata dynamic field
- * with PKT_RX_DYNF_METADATA flag if set.  The dynamic mbuf field must be
- * registered in advance by rte_flow_dynf_metadata_register().
+ * RTE_MBUF_DYNFLAG_TX_METADATA flag on egress will be overridden by this
+ * action. On ingress, the metadata will be carried by mbuf metadata dynamic
+ * field with RTE_MBUF_DYNFLAG_RX_METADATA flag if set.  The dynamic mbuf field
+ * must be registered in advance by rte_flow_dynf_metadata_register().
  *
  * Altering partial bits is supported with mask. For bits which have never
  * been set, unpredictable value will be seen depending on driver
@@ -3422,7 +3590,7 @@ struct rte_flow_action_conntrack {
        uint32_t last_direction:1;
        /** No TCP check will be done except the state change. */
        uint32_t liberal_mode:1;
-       /**<The current state of this connection. */
+       /** The current state of this connection. */
        enum rte_flow_conntrack_state state;
        /** Scaling factor for maximal allowed ACK window. */
        uint8_t max_ack_window;
@@ -3535,9 +3703,9 @@ struct rte_flow_action_modify_data {
        RTE_STD_C11
        union {
                struct {
-                       /**< Encapsulation level or tag index. */
+                       /** Encapsulation level or tag index. */
                        uint32_t level;
-                       /**< Number of bits to skip from a field. */
+                       /** Number of bits to skip from a field. */
                        uint32_t offset;
                };
                /**
@@ -3593,8 +3761,12 @@ extern uint64_t rte_flow_dynf_metadata_mask;
        RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
 
 /* Mbuf dynamic flags for metadata. */
-#define PKT_RX_DYNF_METADATA (rte_flow_dynf_metadata_mask)
-#define PKT_TX_DYNF_METADATA (rte_flow_dynf_metadata_mask)
+#define RTE_MBUF_DYNFLAG_RX_METADATA (rte_flow_dynf_metadata_mask)
+#define PKT_RX_DYNF_METADATA RTE_DEPRECATED(PKT_RX_DYNF_METADATA) \
+               RTE_MBUF_DYNFLAG_RX_METADATA
+#define RTE_MBUF_DYNFLAG_TX_METADATA (rte_flow_dynf_metadata_mask)
+#define PKT_TX_DYNF_METADATA RTE_DEPRECATED(PKT_TX_DYNF_METADATA) \
+               RTE_MBUF_DYNFLAG_TX_METADATA
 
 __rte_experimental
 static inline uint32_t
@@ -3648,8 +3820,8 @@ struct rte_flow;
  */
 struct rte_flow_action_sample {
        uint32_t ratio; /**< packets sampled equals to '1/ratio'. */
+       /** sub-action list specific for the sampling hit cases. */
        const struct rte_flow_action *actions;
-               /**< sub-action list specific for the sampling hit cases. */
 };
 
 /**
@@ -3676,6 +3848,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. */
 };
 
 /**
@@ -3881,7 +4054,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
@@ -4243,7 +4416,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.
@@ -4281,10 +4454,10 @@ struct rte_flow_indir_action_conf {
         * Action should be valid at least for one flow direction,
         * otherwise it is invalid for both ingress and egress rules.
         */
+       /** Action valid for rules applied to ingress traffic. */
        uint32_t ingress:1;
-       /**< Action valid for rules applied to ingress traffic. */
+       /** Action valid for rules applied to egress traffic. */
        uint32_t egress:1;
-       /**< Action valid for rules applied to egress traffic. */
        /**
         * When set to 1, indicates that the action is valid for
         * transfer traffic; otherwise, for non-transfer traffic.
@@ -4463,17 +4636,17 @@ struct rte_flow_tunnel {
 /**
  * Indicate that the packet has a tunnel.
  */
-#define RTE_FLOW_RESTORE_INFO_TUNNEL  (1ULL << 0)
+#define RTE_FLOW_RESTORE_INFO_TUNNEL RTE_BIT64(0)
 
 /**
  * Indicate that the packet has a non decapsulated tunnel header.
  */
-#define RTE_FLOW_RESTORE_INFO_ENCAPSULATED  (1ULL << 1)
+#define RTE_FLOW_RESTORE_INFO_ENCAPSULATED RTE_BIT64(1)
 
 /**
  * Indicate that the packet has a group_id.
  */
-#define RTE_FLOW_RESTORE_INFO_GROUP_ID  (1ULL << 2)
+#define RTE_FLOW_RESTORE_INFO_GROUP_ID RTE_BIT64(2)
 
 /**
  * Restore information structure to communicate the current packet processing
@@ -4702,6 +4875,744 @@ rte_flow_flex_item_release(uint16_t port_id,
                           const struct rte_flow_item_flex_handle *handle,
                           struct rte_flow_error *error);
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Information about flow engine resources.
+ * The zero value means a resource is not supported.
+ *
+ */
+struct rte_flow_port_info {
+       /**
+        * Maximum number of queues for asynchronous operations.
+        */
+       uint32_t max_nb_queues;
+       /**
+        * Maximum number of counters.
+        * @see RTE_FLOW_ACTION_TYPE_COUNT
+        */
+       uint32_t max_nb_counters;
+       /**
+        * Maximum number of aging objects.
+        * @see RTE_FLOW_ACTION_TYPE_AGE
+        */
+       uint32_t max_nb_aging_objects;
+       /**
+        * Maximum number traffic meters.
+        * @see RTE_FLOW_ACTION_TYPE_METER
+        */
+       uint32_t max_nb_meters;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Information about flow engine asynchronous queues.
+ * The value only valid if @p port_attr.max_nb_queues is not zero.
+ *
+ */
+struct rte_flow_queue_info {
+       /**
+        * Maximum number of operations a queue can hold.
+        */
+       uint32_t max_size;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Get information about flow engine resources.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param[out] port_info
+ *   A pointer to a structure of type *rte_flow_port_info*
+ *   to be filled with the resources information of the port.
+ * @param[out] queue_info
+ *   A pointer to a structure of type *rte_flow_queue_info*
+ *   to be filled with the asynchronous queues information.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+__rte_experimental
+int
+rte_flow_info_get(uint16_t port_id,
+                 struct rte_flow_port_info *port_info,
+                 struct rte_flow_queue_info *queue_info,
+                 struct rte_flow_error *error);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Flow engine resources settings.
+ * The zero value means on demand resource allocations only.
+ *
+ */
+struct rte_flow_port_attr {
+       /**
+        * Number of counters to configure.
+        * @see RTE_FLOW_ACTION_TYPE_COUNT
+        */
+       uint32_t nb_counters;
+       /**
+        * Number of aging objects to configure.
+        * @see RTE_FLOW_ACTION_TYPE_AGE
+        */
+       uint32_t nb_aging_objects;
+       /**
+        * Number of traffic meters to configure.
+        * @see RTE_FLOW_ACTION_TYPE_METER
+        */
+       uint32_t nb_meters;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Flow engine asynchronous queues settings.
+ * The value means default value picked by PMD.
+ *
+ */
+struct rte_flow_queue_attr {
+       /**
+        * Number of flow rule operations a queue can hold.
+        */
+       uint32_t size;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Configure the port's flow API engine.
+ *
+ * This API can only be invoked before the application
+ * starts using the rest of the flow library functions.
+ *
+ * The API can be invoked multiple times to change the settings.
+ * The port, however, may reject changes and keep the old config.
+ *
+ * Parameters in configuration attributes must not exceed
+ * numbers of resources returned by the rte_flow_info_get API.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param[in] port_attr
+ *   Port configuration attributes.
+ * @param[in] nb_queue
+ *   Number of flow queues to be configured.
+ * @param[in] queue_attr
+ *   Array that holds attributes for each flow queue.
+ *   Number of elements is set in @p port_attr.nb_queues.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+__rte_experimental
+int
+rte_flow_configure(uint16_t port_id,
+                  const struct rte_flow_port_attr *port_attr,
+                  uint16_t nb_queue,
+                  const struct rte_flow_queue_attr *queue_attr[],
+                  struct rte_flow_error *error);
+
+/**
+ * Opaque type returned after successful creation of pattern template.
+ * This handle can be used to manage the created pattern template.
+ */
+struct rte_flow_pattern_template;
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Flow pattern template attributes.
+ */
+__extension__
+struct rte_flow_pattern_template_attr {
+       /**
+        * Relaxed matching policy.
+        * - If 1, matching is performed only on items with the mask member set
+        * and matching on protocol layers specified without any masks is skipped.
+        * - If 0, matching on protocol layers specified without any masks is done
+        * as well. This is the standard behaviour of Flow API now.
+        */
+       uint32_t relaxed_matching:1;
+       /**
+        * Flow direction for the pattern template.
+        * At least one direction must be specified.
+        */
+       /** Pattern valid for rules applied to ingress traffic. */
+       uint32_t ingress:1;
+       /** Pattern valid for rules applied to egress traffic. */
+       uint32_t egress:1;
+       /** Pattern valid for rules applied to transfer traffic. */
+       uint32_t transfer:1;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Create flow pattern template.
+ *
+ * The pattern template defines common matching fields without values.
+ * For example, matching on 5 tuple TCP flow, the template will be
+ * eth(null) + IPv4(source + dest) + TCP(s_port + d_port),
+ * while values for each rule will be set during the flow rule creation.
+ * The number and order of items in the template must be the same
+ * at the rule creation.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param[in] template_attr
+ *   Pattern template attributes.
+ * @param[in] pattern
+ *   Pattern specification (list terminated by the END pattern item).
+ *   The spec member of an item is not used unless the end member is used.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   Handle on success, NULL otherwise and rte_errno is set.
+ */
+__rte_experimental
+struct rte_flow_pattern_template *
+rte_flow_pattern_template_create(uint16_t port_id,
+               const struct rte_flow_pattern_template_attr *template_attr,
+               const struct rte_flow_item pattern[],
+               struct rte_flow_error *error);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Destroy flow pattern template.
+ *
+ * This function may be called only when
+ * there are no more tables referencing this template.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param[in] pattern_template
+ *   Handle of the template to be destroyed.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+__rte_experimental
+int
+rte_flow_pattern_template_destroy(uint16_t port_id,
+               struct rte_flow_pattern_template *pattern_template,
+               struct rte_flow_error *error);
+
+/**
+ * Opaque type returned after successful creation of actions template.
+ * This handle can be used to manage the created actions template.
+ */
+struct rte_flow_actions_template;
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Flow actions template attributes.
+ */
+__extension__
+struct rte_flow_actions_template_attr {
+       /**
+        * Flow direction for the actions template.
+        * At least one direction must be specified.
+        */
+       /** Action valid for rules applied to ingress traffic. */
+       uint32_t ingress:1;
+       /** Action valid for rules applied to egress traffic. */
+       uint32_t egress:1;
+       /** Action valid for rules applied to transfer traffic. */
+       uint32_t transfer:1;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Create flow actions template.
+ *
+ * The actions template holds a list of action types without values.
+ * For example, the template to change TCP ports is TCP(s_port + d_port),
+ * while values for each rule will be set during the flow rule creation.
+ * The number and order of actions in the template must be the same
+ * at the rule creation.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param[in] template_attr
+ *   Template attributes.
+ * @param[in] actions
+ *   Associated actions (list terminated by the END action).
+ *   The spec member is only used if @p masks spec is non-zero.
+ * @param[in] masks
+ *   List of actions that marks which of the action's member is constant.
+ *   A mask has the same format as the corresponding action.
+ *   If the action field in @p masks is not 0,
+ *   the corresponding value in an action from @p actions will be the part
+ *   of the template and used in all flow rules.
+ *   The order of actions in @p masks is the same as in @p actions.
+ *   In case of indirect actions present in @p actions,
+ *   the actual action type should be present in @p mask.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   Handle on success, NULL otherwise and rte_errno is set.
+ */
+__rte_experimental
+struct rte_flow_actions_template *
+rte_flow_actions_template_create(uint16_t port_id,
+               const struct rte_flow_actions_template_attr *template_attr,
+               const struct rte_flow_action actions[],
+               const struct rte_flow_action masks[],
+               struct rte_flow_error *error);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Destroy flow actions template.
+ *
+ * This function may be called only when
+ * there are no more tables referencing this template.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param[in] actions_template
+ *   Handle to the template to be destroyed.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+__rte_experimental
+int
+rte_flow_actions_template_destroy(uint16_t port_id,
+               struct rte_flow_actions_template *actions_template,
+               struct rte_flow_error *error);
+
+/**
+ * Opaque type returned after successful creation of a template table.
+ * This handle can be used to manage the created template table.
+ */
+struct rte_flow_template_table;
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Table attributes.
+ */
+struct rte_flow_template_table_attr {
+       /**
+        * Flow attributes to be used in each rule generated from this table.
+        */
+       struct rte_flow_attr flow_attr;
+       /**
+        * Maximum number of flow rules that this table holds.
+        */
+       uint32_t nb_flows;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Create flow template table.
+ *
+ * A template table consists of multiple pattern templates and actions
+ * templates associated with a single set of rule attributes (group ID,
+ * priority and traffic direction).
+ *
+ * Each rule is free to use any combination of pattern and actions templates
+ * and specify particular values for items and actions it would like to change.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param[in] table_attr
+ *   Template table attributes.
+ * @param[in] pattern_templates
+ *   Array of pattern templates to be used in this table.
+ * @param[in] nb_pattern_templates
+ *   The number of pattern templates in the pattern_templates array.
+ * @param[in] actions_templates
+ *   Array of actions templates to be used in this table.
+ * @param[in] nb_actions_templates
+ *   The number of actions templates in the actions_templates array.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   Handle on success, NULL otherwise and rte_errno is set.
+ */
+__rte_experimental
+struct rte_flow_template_table *
+rte_flow_template_table_create(uint16_t port_id,
+               const struct rte_flow_template_table_attr *table_attr,
+               struct rte_flow_pattern_template *pattern_templates[],
+               uint8_t nb_pattern_templates,
+               struct rte_flow_actions_template *actions_templates[],
+               uint8_t nb_actions_templates,
+               struct rte_flow_error *error);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Destroy flow template table.
+ *
+ * This function may be called only when
+ * there are no more flow rules referencing this table.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param[in] template_table
+ *   Handle to the table to be destroyed.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+__rte_experimental
+int
+rte_flow_template_table_destroy(uint16_t port_id,
+               struct rte_flow_template_table *template_table,
+               struct rte_flow_error *error);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Asynchronous operation attributes.
+ */
+__extension__
+struct rte_flow_op_attr {
+        /**
+         * When set, the requested action will not be sent to the HW immediately.
+         * The application must call the rte_flow_queue_push to actually send it.
+         */
+       uint32_t postpone:1;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Enqueue rule creation operation.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param queue_id
+ *   Flow queue used to insert the rule.
+ * @param[in] op_attr
+ *   Rule creation operation attributes.
+ * @param[in] template_table
+ *   Template table to select templates from.
+ * @param[in] pattern
+ *   List of pattern items to be used.
+ *   The list order should match the order in the pattern template.
+ *   The spec is the only relevant member of the item that is being used.
+ * @param[in] pattern_template_index
+ *   Pattern template index in the table.
+ * @param[in] actions
+ *   List of actions to be used.
+ *   The list order should match the order in the actions template.
+ * @param[in] actions_template_index
+ *   Actions template index in the table.
+ * @param[in] user_data
+ *   The user data that will be returned on the completion events.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   Handle on success, NULL otherwise and rte_errno is set.
+ *   The rule handle doesn't mean that the rule has been populated.
+ *   Only completion result indicates that if there was success or failure.
+ */
+__rte_experimental
+struct rte_flow *
+rte_flow_async_create(uint16_t port_id,
+                     uint32_t queue_id,
+                     const struct rte_flow_op_attr *op_attr,
+                     struct rte_flow_template_table *template_table,
+                     const struct rte_flow_item pattern[],
+                     uint8_t pattern_template_index,
+                     const struct rte_flow_action actions[],
+                     uint8_t actions_template_index,
+                     void *user_data,
+                     struct rte_flow_error *error);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Enqueue rule destruction operation.
+ *
+ * This function enqueues a destruction operation on the queue.
+ * Application should assume that after calling this function
+ * the rule handle is not valid anymore.
+ * Completion indicates the full removal of the rule from the HW.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param queue_id
+ *   Flow queue which is used to destroy the rule.
+ *   This must match the queue on which the rule was created.
+ * @param[in] op_attr
+ *   Rule destruction operation attributes.
+ * @param[in] flow
+ *   Flow handle to be destroyed.
+ * @param[in] user_data
+ *   The user data that will be returned on the completion events.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+__rte_experimental
+int
+rte_flow_async_destroy(uint16_t port_id,
+                      uint32_t queue_id,
+                      const struct rte_flow_op_attr *op_attr,
+                      struct rte_flow *flow,
+                      void *user_data,
+                      struct rte_flow_error *error);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Push all internally stored rules to the HW.
+ * Postponed rules are rules that were inserted with the postpone flag set.
+ * Can be used to notify the HW about batch of rules prepared by the SW to
+ * reduce the number of communications between the HW and SW.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param queue_id
+ *   Flow queue to be pushed.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+__rte_experimental
+int
+rte_flow_push(uint16_t port_id,
+             uint32_t queue_id,
+             struct rte_flow_error *error);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Asynchronous operation status.
+ */
+enum rte_flow_op_status {
+       /**
+        * The operation was completed successfully.
+        */
+       RTE_FLOW_OP_SUCCESS,
+       /**
+        * The operation was not completed successfully.
+        */
+       RTE_FLOW_OP_ERROR,
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Asynchronous operation result.
+ */
+__extension__
+struct rte_flow_op_result {
+       /**
+        * Returns the status of the operation that this completion signals.
+        */
+       enum rte_flow_op_status status;
+       /**
+        * The user data that will be returned on the completion events.
+        */
+       void *user_data;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Pull a rte flow operation.
+ * The application must invoke this function in order to complete
+ * the flow rule offloading and to retrieve the flow rule operation status.
+ *
+ * @param port_id
+ *   Port identifier of Ethernet device.
+ * @param queue_id
+ *   Flow queue which is used to pull the operation.
+ * @param[out] res
+ *   Array of results that will be set.
+ * @param[in] n_res
+ *   Maximum number of results that can be returned.
+ *   This value is equal to the size of the res array.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   Number of results that were pulled,
+ *   a negative errno value otherwise and rte_errno is set.
+ */
+__rte_experimental
+int
+rte_flow_pull(uint16_t port_id,
+             uint32_t queue_id,
+             struct rte_flow_op_result res[],
+             uint16_t n_res,
+             struct rte_flow_error *error);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Enqueue indirect action creation operation.
+ * @see rte_flow_action_handle_create
+ *
+ * @param[in] port_id
+ *   Port identifier of Ethernet device.
+ * @param[in] queue_id
+ *   Flow queue which is used to create the rule.
+ * @param[in] op_attr
+ *   Indirect action creation operation attributes.
+ * @param[in] indir_action_conf
+ *   Action configuration for the indirect action object creation.
+ * @param[in] action
+ *   Specific configuration of the indirect action object.
+ * @param[in] user_data
+ *   The user data that will be returned on the completion events.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   A valid handle in case of success, NULL otherwise and rte_errno is set.
+ */
+__rte_experimental
+struct rte_flow_action_handle *
+rte_flow_async_action_handle_create(uint16_t port_id,
+               uint32_t queue_id,
+               const struct rte_flow_op_attr *op_attr,
+               const struct rte_flow_indir_action_conf *indir_action_conf,
+               const struct rte_flow_action *action,
+               void *user_data,
+               struct rte_flow_error *error);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Enqueue indirect action destruction operation.
+ * The destroy queue must be the same
+ * as the queue on which the action was created.
+ *
+ * @param[in] port_id
+ *   Port identifier of Ethernet device.
+ * @param[in] queue_id
+ *   Flow queue which is used to destroy the rule.
+ * @param[in] op_attr
+ *   Indirect action destruction operation attributes.
+ * @param[in] action_handle
+ *   Handle for the indirect action object to be destroyed.
+ * @param[in] user_data
+ *   The user data that will be returned on the completion events.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+__rte_experimental
+int
+rte_flow_async_action_handle_destroy(uint16_t port_id,
+               uint32_t queue_id,
+               const struct rte_flow_op_attr *op_attr,
+               struct rte_flow_action_handle *action_handle,
+               void *user_data,
+               struct rte_flow_error *error);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Enqueue indirect action update operation.
+ * @see rte_flow_action_handle_create
+ *
+ * @param[in] port_id
+ *   Port identifier of Ethernet device.
+ * @param[in] queue_id
+ *   Flow queue which is used to update the rule.
+ * @param[in] op_attr
+ *   Indirect action update operation attributes.
+ * @param[in] action_handle
+ *   Handle for the indirect action object to be updated.
+ * @param[in] update
+ *   Update profile specification used to modify the action pointed by handle.
+ *   *update* could be with the same type of the immediate action corresponding
+ *   to the *handle* argument when creating, or a wrapper structure includes
+ *   action configuration to be updated and bit fields to indicate the member
+ *   of fields inside the action to update.
+ * @param[in] user_data
+ *   The user data that will be returned on the completion events.
+ * @param[out] error
+ *   Perform verbose error reporting if not NULL.
+ *   PMDs initialize this structure in case of error only.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+__rte_experimental
+int
+rte_flow_async_action_handle_update(uint16_t port_id,
+               uint32_t queue_id,
+               const struct rte_flow_op_attr *op_attr,
+               struct rte_flow_action_handle *action_handle,
+               const void *update,
+               void *user_data,
+               struct rte_flow_error *error);
 #ifdef __cplusplus
 }
 #endif