net/i40e: remove duplicate tunnel type check
[dpdk.git] / drivers / net / mlx5 / mlx5_flow.c
index b56bee4..7150173 100644 (file)
@@ -3011,7 +3011,7 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
        };
        struct mlx5_flow_action_copy_mreg cp_mreg = {
                .dst = REG_B,
-               .src = 0,
+               .src = REG_NONE,
        };
        struct rte_flow_action_jump jump = {
                .group = MLX5_FLOW_MREG_ACT_TABLE_GROUP,
@@ -3518,7 +3518,6 @@ flow_hairpin_split(struct rte_eth_dev *dev,
        tag_item->data = UINT32_MAX;
        tag_item->id = UINT16_MAX;
        item->mask = tag_item;
-       addr += sizeof(struct mlx5_rte_flow_item_tag);
        item->last = NULL;
        item++;
        item->type = RTE_FLOW_ITEM_TYPE_END;
@@ -4067,7 +4066,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
                /* Internal PMD action to set register. */
                struct mlx5_rte_flow_item_tag q_tag_spec = {
                        .data = qrss_id,
-                       .id = 0,
+                       .id = REG_NONE,
                };
                struct rte_flow_item q_items[] = {
                        {
@@ -5974,6 +5973,11 @@ next_container:
                goto set_alarm;
        dcs = (struct mlx5_devx_obj *)(uintptr_t)rte_atomic64_read
                                                              (&pool->a64_dcs);
+       if (dcs->id & (MLX5_CNT_BATCH_QUERY_ID_ALIGNMENT - 1)) {
+               /* Pool without valid counter. */
+               pool->raw_hw = NULL;
+               goto next_pool;
+       }
        offset = batch ? 0 : dcs->id % MLX5_COUNTERS_PER_POOL;
        /*
         * Identify the counters released between query trigger and query
@@ -5998,6 +6002,7 @@ next_container:
        pool->raw_hw->min_dcs_id = dcs->id;
        LIST_REMOVE(pool->raw_hw, next);
        sh->cmng.pending_queries++;
+next_pool:
        pool_index++;
        if (pool_index >= rte_atomic16_read(&cont->n_valid)) {
                batch ^= 0x1;