patch 'net/mlx5: fix metadata endianness in modify field action' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Mon Feb 21 16:36:02 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.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/26/22. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c9a140e15bcc47c0b00f0e3ca6912c34449ae736

Thanks.

Kevin

---
>From c9a140e15bcc47c0b00f0e3ca6912c34449ae736 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Date: Thu, 3 Feb 2022 10:46:51 +0200
Subject: [PATCH] net/mlx5: fix metadata endianness in modify field action

[ upstream commit ced4900cdec2a957cf7def05dfb076c089a32e66 ]

As modify field action immediate source parameter the metadata
should follow the CPU endianness (according to SET_META action
structure format), and mlx5 PMD wrongly handled the immediate
parameter metadata buffer as big-endian, resulting in wrong
metadata set action with incorrect endianness.

Fixes: 40c8fb1fd3b3 ("net/mlx5: update modify field action")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index af90a7fd0a..10ef2af06a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1868,5 +1868,5 @@ flow_dv_convert_action_modify_field
 								{0, 0, 0} };
 	uint32_t mask[MLX5_ACT_MAX_MOD_FIELDS] = {0, 0, 0, 0, 0};
-	uint32_t type;
+	uint32_t type, meta = 0;
 	uint32_t shift = 0;
 
@@ -1881,4 +1881,9 @@ flow_dv_convert_action_modify_field
 					(void *)(uintptr_t)conf->src.pvalue :
 					(void *)(uintptr_t)&conf->src.value;
+		if (conf->dst.field == RTE_FLOW_FIELD_META) {
+			meta = *(const unaligned_uint32_t *)item.spec;
+			meta = rte_cpu_to_be_32(meta);
+			item.spec = &meta;
+		}
 	} else {
 		type = MLX5_MODIFICATION_TYPE_COPY;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-21 15:22:48.288522390 +0000
+++ 0173-net-mlx5-fix-metadata-endianness-in-modify-field-act.patch	2022-02-21 15:22:44.344704696 +0000
@@ -1 +1 @@
-From ced4900cdec2a957cf7def05dfb076c089a32e66 Mon Sep 17 00:00:00 2001
+From c9a140e15bcc47c0b00f0e3ca6912c34449ae736 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ced4900cdec2a957cf7def05dfb076c089a32e66 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list