[dpdk-stable] patch 'net/mlx5: fix comparison sign in flow engine' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:16:08 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/07/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8e9f688bdbd058b84c0501a5a12af52b1851516c

Thanks.

Luca Boccassi

---
>From 8e9f688bdbd058b84c0501a5a12af52b1851516c Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn at nvidia.com>
Date: Mon, 28 Dec 2020 14:33:02 +0200
Subject: [PATCH] net/mlx5: fix comparison sign in flow engine

[ upstream commit 16047bd015e292df2a6c61b8f4584f7c166d2f51 ]

The clang compiler warns on size mismatches of several
comparisons.

warning: comparison of integers of different signs

To resolve those the right types is used/cast to.

Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query")
Fixes: e554b672aa05 ("net/mlx5: support flow tag")
Fixes: c8f0abe7f89d ("net/mlx5: fix meter color register consideration")

Signed-off-by: Tal Shnaiderman <talshn at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c    | 4 ++--
 drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e0c23927eb..522d238c27 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -798,7 +798,7 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
 		start_reg = priv->mtr_color_reg != REG_C_2 ? REG_C_2 :
 			    (priv->mtr_reg_share ? REG_C_3 : REG_C_4);
 		skip_mtr_reg = !!(priv->mtr_en && start_reg == REG_C_2);
-		if (id > (REG_C_7 - start_reg))
+		if (id > (uint32_t)(REG_C_7 - start_reg))
 			return rte_flow_error_set(error, EINVAL,
 						  RTE_FLOW_ERROR_TYPE_ITEM,
 						  NULL, "invalid tag id");
@@ -814,7 +814,7 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
 		 */
 		if (skip_mtr_reg && config->flow_mreg_c
 		    [id + start_reg - REG_C_0] >= priv->mtr_color_reg) {
-			if (id >= (REG_C_7 - start_reg))
+			if (id >= (uint32_t)(REG_C_7 - start_reg))
 				return rte_flow_error_set(error, EINVAL,
 						       RTE_FLOW_ERROR_TYPE_ITEM,
 							NULL, "invalid tag id");
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 618e248799..30ceb143ef 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -955,7 +955,7 @@ flow_dv_convert_action_set_reg
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
 					  "too many items to modify");
 	MLX5_ASSERT(conf->id != REG_NON);
-	MLX5_ASSERT(conf->id < RTE_DIM(reg_to_field));
+	MLX5_ASSERT(conf->id < (enum modify_reg)RTE_DIM(reg_to_field));
 	actions[i] = (struct mlx5_modification_cmd) {
 		.action_type = MLX5_MODIFICATION_TYPE_SET,
 		.field = reg_to_field[conf->id],
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.943178282 +0000
+++ 0082-net-mlx5-fix-comparison-sign-in-flow-engine.patch	2021-02-05 11:18:28.906693016 +0000
@@ -1 +1 @@
-From 16047bd015e292df2a6c61b8f4584f7c166d2f51 Mon Sep 17 00:00:00 2001
+From 8e9f688bdbd058b84c0501a5a12af52b1851516c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 16047bd015e292df2a6c61b8f4584f7c166d2f51 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -21,4 +22,3 @@
- drivers/net/mlx5/mlx5_flow.c            | 4 ++--
- drivers/net/mlx5/mlx5_flow_dv.c         | 2 +-
- drivers/net/mlx5/windows/mlx5_flow_os.c | 2 +-
- 3 files changed, 4 insertions(+), 4 deletions(-)
+ drivers/net/mlx5/mlx5_flow.c    | 4 ++--
+ drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
@@ -27 +27 @@
-index b1c061a3f0..f110c6b714 100644
+index e0c23927eb..522d238c27 100644
@@ -49 +49 @@
-index f628268344..ce229dbe85 100644
+index 618e248799..30ceb143ef 100644
@@ -61,13 +60,0 @@
-diff --git a/drivers/net/mlx5/windows/mlx5_flow_os.c b/drivers/net/mlx5/windows/mlx5_flow_os.c
-index daf4e15ddb..acd7de61e0 100644
---- a/drivers/net/mlx5/windows/mlx5_flow_os.c
-+++ b/drivers/net/mlx5/windows/mlx5_flow_os.c
-@@ -188,7 +188,7 @@ mlx5_flow_os_create_flow(void *matcher, void *match_value,
- 			 void *actions[], void **flow)
- {
- 	struct mlx5_action *action;
--	int i;
-+	size_t i;
- 	struct mlx5_matcher *mlx5_matcher = matcher;
- 	struct mlx5_flow_dv_match_params *mlx5_match_value = match_value;
- 	uint32_t in[MLX5_ST_SZ_DW(devx_fs_rule_add_in)] = {0};


More information about the stable mailing list