net/mlx5: rename Verbs flow to generic name
[dpdk.git] / drivers / net / mlx5 / mlx5_flow.h
index 7f5e01f..74d2c49 100644 (file)
@@ -43,6 +43,7 @@ enum mlx5_rte_flow_action_type {
        MLX5_RTE_FLOW_ACTION_TYPE_TAG,
        MLX5_RTE_FLOW_ACTION_TYPE_MARK,
        MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+       MLX5_RTE_FLOW_ACTION_TYPE_DEFAULT_MISS,
 };
 
 /* Matches on selected register. */
@@ -200,10 +201,12 @@ enum mlx5_feature_name {
 #define MLX5_FLOW_ACTION_SET_IPV4_DSCP (1ull << 32)
 #define MLX5_FLOW_ACTION_SET_IPV6_DSCP (1ull << 33)
 #define MLX5_FLOW_ACTION_AGE (1ull << 34)
+#define MLX5_FLOW_ACTION_DEFAULT_MISS (1ull << 35)
 
 #define MLX5_FLOW_FATE_ACTIONS \
        (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE | \
-        MLX5_FLOW_ACTION_RSS | MLX5_FLOW_ACTION_JUMP)
+        MLX5_FLOW_ACTION_RSS | MLX5_FLOW_ACTION_JUMP | \
+        MLX5_FLOW_ACTION_DEFAULT_MISS)
 
 #define MLX5_FLOW_FATE_ESWITCH_ACTIONS \
        (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_PORT_ID | \
@@ -364,6 +367,7 @@ enum mlx5_flow_fate_type {
        MLX5_FLOW_FATE_JUMP,
        MLX5_FLOW_FATE_PORT_ID,
        MLX5_FLOW_FATE_DROP,
+       MLX5_FLOW_FATE_DEFAULT_MISS,
        MLX5_FLOW_FATE_MAX,
 };
 
@@ -534,7 +538,7 @@ struct mlx5_flow_handle {
        /**< Index to next device flow handle. */
        uint64_t layers;
        /**< Bit-fields of present layers, see MLX5_FLOW_LAYER_*. */
-       void *ib_flow; /**< Verbs flow pointer. */
+       void *drv_flow; /**< pointer to driver flow object. */
        uint32_t split_flow_id:28; /**< Sub flow unique match flow id. */
        uint32_t mark:1; /**< Metadate rxq mark flag. */
        uint32_t fate_action:3; /**< Fate action type. */
@@ -545,6 +549,8 @@ struct mlx5_flow_handle {
                /**< Index to port ID action resource. */
                uint32_t rix_fate;
                /**< Generic value indicates the fate action. */
+               uint32_t rix_default_fate;
+               /**< Indicates default miss fate action. */
        };
 #ifdef HAVE_IBV_FLOW_DV_SUPPORT
        struct mlx5_flow_handle_dv dvh;
@@ -900,12 +906,6 @@ struct mlx5_flow_driver_ops {
        mlx5_flow_get_aged_flows_t get_aged_flows;
 };
 
-
-#define MLX5_CNT_CONTAINER(sh, batch, thread, age) (&(sh)->cmng.ccont \
-       [(((sh)->cmng.mhi[batch][age] >> (thread)) & 0x1) * 2 + (batch)][age])
-#define MLX5_CNT_CONTAINER_UNUSED(sh, batch, thread, age) (&(sh)->cmng.ccont \
-       [(~((sh)->cmng.mhi[batch][age] >> (thread)) & 0x1) * 2 + (batch)][age])
-
 /* mlx5_flow.c */
 
 struct mlx5_flow_id_pool *mlx5_flow_id_pool_alloc(uint32_t max_id);
@@ -952,6 +952,9 @@ int mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
                                  const struct rte_flow_attr *attr,
                                  uint64_t item_flags,
                                  struct rte_flow_error *error);
+int mlx5_flow_validate_action_default_miss(uint64_t action_flags,
+                               const struct rte_flow_attr *attr,
+                               struct rte_flow_error *error);
 int mlx5_flow_validate_attributes(struct rte_eth_dev *dev,
                                  const struct rte_flow_attr *attributes,
                                  struct rte_flow_error *error);