net/mlx5: remove unneeded constant definition
Checks
Commit Message
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.
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
drivers/net/mlx5/mlx5.h | 1 -
drivers/net/mlx5/mlx5_flow_dv.c | 5 ++---
2 files changed, 2 insertions(+), 4 deletions(-)
Comments
From: Dekel Peled <dekelp@mellanox.com>
> 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.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Hi,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
> Sent: Tuesday, August 27, 2019 1:47 PM
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; Shahaf Shuler <shahafs@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: remove unneeded constant
> definition
>
> 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.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
@@ -516,7 +516,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
@@ -4476,7 +4476,7 @@ struct field_modify_info modify_tcp[] = {
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 @@ struct field_modify_info modify_tcp[] = {
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)