ipc: end multiprocess thread during cleanup
[dpdk.git] / lib / ethdev / rte_flow.h
index db3392b..1031fb2 100644 (file)
@@ -1520,11 +1520,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;
@@ -2239,8 +2240,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.
         *
@@ -2252,7 +2253,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.
         *
@@ -2362,6 +2363,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.
         *
@@ -2370,6 +2374,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.
         *
@@ -2378,6 +2385,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.
         *
@@ -2386,6 +2396,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.
         *
@@ -2394,6 +2407,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.
@@ -2403,6 +2419,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.
@@ -2508,6 +2527,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,
@@ -2518,6 +2540,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,
@@ -2528,6 +2553,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,
@@ -2538,6 +2566,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,
@@ -2548,6 +2579,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
@@ -2559,6 +2593,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
@@ -2581,6 +2618,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.
@@ -2588,6 +2628,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
@@ -2595,6 +2638,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,
@@ -2605,6 +2651,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,
@@ -2615,6 +2664,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
@@ -2629,6 +2681,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
@@ -2643,6 +2698,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
@@ -2657,6 +2715,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
@@ -2671,6 +2732,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
@@ -2681,6 +2745,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.
@@ -2688,6 +2755,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,
@@ -2698,6 +2768,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,
@@ -2792,8 +2865,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
@@ -2957,7 +3030,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. */
@@ -3068,6 +3141,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
@@ -3078,6 +3154,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
@@ -3336,10 +3415,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
@@ -3660,8 +3739,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
@@ -3743,6 +3826,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. */
 };
 
 /**
@@ -3948,7 +4032,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
@@ -4310,7 +4394,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.