From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id DDB52A0524
	for <public@inbox.dpdk.org>; Fri,  5 Feb 2021 12:23:56 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id D3F4E188742;
	Fri,  5 Feb 2021 12:23:56 +0100 (CET)
Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com
 [209.85.221.46])
 by mails.dpdk.org (Postfix) with ESMTP id 1E127188742
 for <stable@dpdk.org>; Fri,  5 Feb 2021 12:23:55 +0100 (CET)
Received: by mail-wr1-f46.google.com with SMTP id l12so7313014wry.2
 for <stable@dpdk.org>; Fri, 05 Feb 2021 03:23:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=zrDaH9f2eb7Q0mMKY+xfeIRgVEqtjkqQ9u3T/mLxtpI=;
 b=RBJu2zzVmG3EPqIaNIEoF/9KiBbtLnypMb6zhl+x4HKhcKJbFvtnObhkmzZtEu3jXc
 yPvtLd0wlfN/GF17rCmgDEo6NNHLPhxcfFOjsRgHYyf/h9lpP/Y3YE/0KFOdNMzj14Z8
 DZYJXG+y3s4mDzmI6qJ+tge+pmx+Y2L0U++BTaXI0LcK3civSQ5D34yP9r1cWjm0uitO
 rhIVg6XGy4WJNIEuAeKRehRF8/l1/blQ5IwThbnTVAuTiFk1WSUqhfNhCiis6GY/Hccv
 JfdaNFyOK+jGYLXOJLW7pLXj5dsYtRo4WADGvlDuznTacK0b6mRvfMCzk6hJCfNJOmGa
 K7TA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=zrDaH9f2eb7Q0mMKY+xfeIRgVEqtjkqQ9u3T/mLxtpI=;
 b=OD4s03CsqspLRTG9F1MjcJ9SHZzZ7gYB0pYJnMNDIXwmplS4Ro1+4yMYTQJr6lsOP4
 6HXl8oX3lY7amVYxKHDGczWlJoCmVRQjdsWFC/SZvDZzyJSgx5Qi3VkfXHbhLbVS40gB
 nwHHbSbAHQjjZIoEOGsI+yJpCgL5WibvU9nu2cvOOsFXUjFOxbzRJoVaSm6beVvQuqsf
 1YFDXNrXCa0W4vELAHsJb4ZoE5uRdRoyW7fpx/OGXDpLF71cQ1i7oU48Y+EdHLQvd3wE
 /p9Ar49yY/G6f2i+5en/Z5UwT/9MbNSiSmIcfMj6uAhSp3SUytQgXUM7NnOe3b9sCUUK
 mHbg==
X-Gm-Message-State: AOAM532dw4cryuJjeqGBeHgiVxWzKIK0bLNgbaw50Dw+GS9ZKl64vK2d
 glvKhf+Y+2wz1sYsFK+VCE0=
X-Google-Smtp-Source: ABdhPJxr3b3RiLz7zRjc8h083RNlS0Iq6gkf8HzG+w3gAyoA8dcUIqK04X/9VJAHCxeg7H5K8vhKbg==
X-Received: by 2002:a5d:4d4a:: with SMTP id a10mr4543971wru.174.1612524234882; 
 Fri, 05 Feb 2021 03:23:54 -0800 (PST)
Received: from localhost ([88.98.246.218])
 by smtp.gmail.com with ESMTPSA id z15sm11035497wrs.25.2021.02.05.03.23.54
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 05 Feb 2021 03:23:54 -0800 (PST)
From: luca.boccassi@gmail.com
To: Tal Shnaiderman <talshn@nvidia.com>
Cc: Matan Azrad <matan@nvidia.com>,
	dpdk stable <stable@dpdk.org>
Date: Fri,  5 Feb 2021 11:16:08 +0000
Message-Id: <20210205111920.1272063-82-luca.boccassi@gmail.com>
X-Mailer: git-send-email 2.29.2
In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com>
References: <20210205111920.1272063-1-luca.boccassi@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-stable] patch 'net/mlx5: fix comparison sign in flow engine'
 has been queued to stable release 20.11.1
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org
Sender: "stable" <stable-bounces@dpdk.org>

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@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@nvidia.com>
Acked-by: Matan Azrad <matan@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@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};