]> git.droids-corp.org - dpdk.git/commitdiff
net/mlx5: remove indirection table type field
authorMichael Baum <michaelba@nvidia.com>
Thu, 3 Sep 2020 10:13:45 +0000 (10:13 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:08 +0000 (18:55 +0200)
Once the separation between Verbs and DevX is done using function
pointers, the type field of the indirection table structure becomes
redundant and no more code is used.
Remove the unnecessary field from the structure.

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/linux/mlx5_verbs.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_devx.c

index c281e86760f62a7c213d037621f4b5f50119c973..56570b7f6eaa88b081a8eca5b99dc5c11ffad2c1 100644 (file)
@@ -470,7 +470,6 @@ mlx5_ibv_ind_table_obj_new(struct rte_eth_dev *dev, const uint16_t *queues,
                rte_errno = ENOMEM;
                return NULL;
        }
-       ind_tbl->type = MLX5_IND_TBL_TYPE_IBV;
        for (i = 0; i != queues_n; ++i) {
                struct mlx5_rxq_ctrl *rxq = mlx5_rxq_get(dev, queues[i]);
                if (!rxq)
index 9fc4639f70d4f2cd569fb5b90ec9f42efb96e931..9594856674d48a2c2050aa221d81c7846b9689f3 100644 (file)
@@ -704,16 +704,10 @@ struct mlx5_rxq_obj {
        };
 };
 
-enum mlx5_ind_tbl_type {
-       MLX5_IND_TBL_TYPE_IBV,
-       MLX5_IND_TBL_TYPE_DEVX,
-};
-
 /* Indirection table. */
 struct mlx5_ind_table_obj {
        LIST_ENTRY(mlx5_ind_table_obj) next; /* Pointer to the next element. */
        rte_atomic32_t refcnt; /* Reference counter. */
-       enum mlx5_ind_tbl_type type;
        RTE_STD_C11
        union {
                void *ind_table; /**< Indirection table. */
index b1b303742b49ec9a6fb07b00b09f0c0be563532e..5fa41f18c0339107ba7d052c613010da6af601ad 100644 (file)
@@ -639,7 +639,6 @@ mlx5_devx_ind_table_obj_new(struct rte_eth_dev *dev, const uint16_t *queues,
                rte_errno = ENOMEM;
                return NULL;
        }
-       ind_tbl->type = MLX5_IND_TBL_TYPE_DEVX;
        rqt_attr = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*rqt_attr) +
                              rqt_n * sizeof(uint32_t), 0, SOCKET_ID_ANY);
        if (!rqt_attr) {