summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDekel Peled <dekelp@mellanox.com>2019-08-27 13:46:34 +0300
committerFerruh Yigit <ferruh.yigit@intel.com>2019-09-06 17:15:14 +0200
commitd2ceaa7353c4e9ef925a8753bc5e5d13eb7bcbeb (patch)
tree8dc5f31b93a65a4b9909a8222843d6228f5549ee
parentc9ba7523c4f5ab03ed0c68be35fc47bce9da89e5 (diff)
downloaddpdk-next-eventdev-d2ceaa7353c4e9ef925a8753bc5e5d13eb7bcbeb.zip
dpdk-next-eventdev-d2ceaa7353c4e9ef925a8753bc5e5d13eb7bcbeb.tar.gz
dpdk-next-eventdev-d2ceaa7353c4e9ef925a8753bc5e5d13eb7bcbeb.tar.xz
net/mlx5: remove unneeded constant
Constant MLX5_GROUP_FACTOR is defined with value 1, and used to multiply group value in two places. This patch removes the unneeded constant definition and use. Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API") Cc: stable@dpdk.org Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
-rw-r--r--drivers/net/mlx5/mlx5.h1
-rw-r--r--drivers/net/mlx5/mlx5_flow_dv.c5
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index ab2e79c..09ca4b1 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -515,7 +515,6 @@ struct mlx5_flow_tbl_resource {
#define MLX5_MAX_TABLES 0xffff
#define MLX5_MAX_TABLES_FDB 0xffff
-#define MLX5_GROUP_FACTOR 1
#define MLX5_DBR_PAGE_SIZE 4096 /* Must be >= 512. */
#define MLX5_DBR_SIZE 8
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7ae4b1c..7b2ba07 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4476,7 +4476,7 @@ flow_dv_matcher_register(struct rte_eth_dev *dev,
return rte_flow_error_set(error, ENOMEM,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
"cannot allocate matcher memory");
- tbl = flow_dv_tbl_resource_get(dev, matcher->group * MLX5_GROUP_FACTOR,
+ tbl = flow_dv_tbl_resource_get(dev, matcher->group,
matcher->egress, matcher->transfer,
error);
if (!tbl) {
@@ -4866,8 +4866,7 @@ cnt_err:
break;
case RTE_FLOW_ACTION_TYPE_JUMP:
jump_data = action->conf;
- tbl = flow_dv_tbl_resource_get(dev, jump_data->group *
- MLX5_GROUP_FACTOR,
+ tbl = flow_dv_tbl_resource_get(dev, jump_data->group,
attr->egress,
attr->transfer, error);
if (!tbl)