DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: remove unneeded constant definition
@ 2019-08-27 10:46 Dekel Peled
  2019-08-27 12:24 ` Matan Azrad
  2019-09-05 10:44 ` Raslan Darawsheh
  0 siblings, 2 replies; 3+ messages in thread
From: Dekel Peled @ 2019-08-27 10:46 UTC (permalink / raw)
  To: matan, viacheslavo, shahafs; +Cc: orika, dev, stable

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(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index d878e33..0308e5e 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -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
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 @@ 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)
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: remove unneeded constant definition
  2019-08-27 10:46 [dpdk-dev] [PATCH] net/mlx5: remove unneeded constant definition Dekel Peled
@ 2019-08-27 12:24 ` Matan Azrad
  2019-09-05 10:44 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Matan Azrad @ 2019-08-27 12:24 UTC (permalink / raw)
  To: Dekel Peled, Slava Ovsiienko, Shahaf Shuler; +Cc: Ori Kam, dev, stable



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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: remove unneeded constant definition
  2019-08-27 10:46 [dpdk-dev] [PATCH] net/mlx5: remove unneeded constant definition Dekel Peled
  2019-08-27 12:24 ` Matan Azrad
@ 2019-09-05 10:44 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2019-09-05 10:44 UTC (permalink / raw)
  To: Dekel Peled, Matan Azrad, Slava Ovsiienko, Shahaf Shuler
  Cc: Ori Kam, dev, stable

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-05 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-27 10:46 [dpdk-dev] [PATCH] net/mlx5: remove unneeded constant definition Dekel Peled
2019-08-27 12:24 ` Matan Azrad
2019-09-05 10:44 ` Raslan Darawsheh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).