net/mlx5: add VXLAN decap action to Direct Verbs
[dpdk.git] / drivers / net / mlx5 / mlx5_flow.h
index c24d26e..4458135 100644 (file)
@@ -92,6 +92,8 @@
 #define MLX5_FLOW_ACTION_DEC_TTL (1u << 19)
 #define MLX5_FLOW_ACTION_SET_MAC_SRC (1u << 20)
 #define MLX5_FLOW_ACTION_SET_MAC_DST (1u << 21)
+#define MLX5_FLOW_ACTION_VXLAN_ENCAP (1u << 22)
+#define MLX5_FLOW_ACTION_VXLAN_DECAP (1u << 23)
 
 #define MLX5_FLOW_FATE_ACTIONS \
        (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE | MLX5_FLOW_ACTION_RSS)
@@ -181,6 +183,8 @@ struct mlx5_flow_dv {
 #ifdef HAVE_IBV_FLOW_DV_SUPPORT
        struct mlx5dv_flow_action_attr actions[MLX5_DV_MAX_NUMBER_OF_ACTIONS];
        /**< Action list. */
+       struct ibv_flow_action *encap_decap_verbs_action;
+       /**< Verbs encap/decap object. */
 #endif
        int actions_n; /**< number of actions. */
 };
@@ -253,7 +257,9 @@ struct rte_flow {
        /**< Device flows that are part of the flow. */
        uint64_t actions;
        /**< Bit-fields of detected actions, see MLX5_FLOW_ACTION_*. */
+       struct mlx5_fdir *fdir; /**< Pointer to associated FDIR if any. */
 };
+
 typedef int (*mlx5_flow_validate_t)(struct rte_eth_dev *dev,
                                    const struct rte_flow_attr *attr,
                                    const struct rte_flow_item items[],