]> git.droids-corp.org - dpdk.git/commitdiff
net/mlx5: remove unneeded constant
authorDekel Peled <dekelp@mellanox.com>
Tue, 27 Aug 2019 10:46:34 +0000 (13:46 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Sep 2019 15:15:14 +0000 (17:15 +0200)
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>
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_flow_dv.c

index ab2e79c45e0e7af4d395485ea9f8a9ab544ae785..09ca4b1836db51adaed883b290b4eb895b650076 100644 (file)
@@ -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
index 7ae4b1cfdc7f4fc35ec46b6479521c9705a05335..7b2ba0723e09013eb94d57d13818fccb2c599592 100644 (file)
@@ -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)