patch 'net/mlx5/hws: fix field copy bind' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Sun Oct 22 16:22:11 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/15/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=461a81717f5d82967baf371f6d1c8be06480a405

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 461a81717f5d82967baf371f6d1c8be06480a405 Mon Sep 17 00:00:00 2001
From: Alex Vesker <valex at nvidia.com>
Date: Mon, 18 Sep 2023 15:07:05 +0300
Subject: [PATCH] net/mlx5/hws: fix field copy bind
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 1e6cb8f290b65d27c94e0caf108d6c35c30fe42b ]

Fix an issue with binding for unused DW selectors,
these selectors are set to zero but zero is also
a valid value used for DMAC_47_16.

Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer")

Signed-off-by: Alex Vesker <valex at nvidia.com>
Reviewed-by: Erez Shitrit <erezsh at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index e61ca7b9b9..24bab9518b 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -1635,11 +1635,15 @@ mlx5dr_definer_find_byte_in_tag(struct mlx5dr_definer *definer,
 				uint32_t *tag_byte_off)
 {
 	uint8_t byte_offset;
-	int i;
+	int i, dw_to_scan;
+
+	/* Avoid accessing unused DW selectors */
+	dw_to_scan = mlx5dr_definer_is_jumbo(definer) ?
+		DW_SELECTORS : DW_SELECTORS_MATCH;

 	/* Add offset since each DW covers multiple BYTEs */
 	byte_offset = hl_byte_off % DW_SIZE;
-	for (i = 0; i < DW_SELECTORS; i++) {
+	for (i = 0; i < dw_to_scan; i++) {
 		if (definer->dw_selector[i] == hl_byte_off / DW_SIZE) {
 			*tag_byte_off = byte_offset + DW_SIZE * (DW_SELECTORS - i - 1);
 			return 0;
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-10-22 22:17:38.093477900 +0800
+++ 0102-net-mlx5-hws-fix-field-copy-bind.patch	2023-10-22 22:17:34.376723700 +0800
@@ -1 +1 @@
-From 1e6cb8f290b65d27c94e0caf108d6c35c30fe42b Mon Sep 17 00:00:00 2001
+From 461a81717f5d82967baf371f6d1c8be06480a405 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 1e6cb8f290b65d27c94e0caf108d6c35c30fe42b ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 68ba906ba1..95b5d4b70e 100644
+index e61ca7b9b9..24bab9518b 100644
@@ -24 +26 @@
-@@ -2364,11 +2364,15 @@ mlx5dr_definer_find_byte_in_tag(struct mlx5dr_definer *definer,
+@@ -1635,11 +1635,15 @@ mlx5dr_definer_find_byte_in_tag(struct mlx5dr_definer *definer,


More information about the stable mailing list