From: Dekel Peled Date: Tue, 27 Aug 2019 10:46:34 +0000 (+0300) Subject: net/mlx5: remove unneeded constant X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d2ceaa7353c4e9ef925a8753bc5e5d13eb7bcbeb;p=dpdk.git 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 Acked-by: Matan Azrad --- diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index ab2e79c45e..09ca4b1836 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 7ae4b1cfdc..7b2ba0723e 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)