patch 'net/mlx5: fix warning about copy length' has been queued to stable release 22.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Mar 18 16:39:16 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/20/24. 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/f6a26c88648f181f03fc00b3731f8174d97dc222

Thanks.

Luca Boccassi

---
>From f6a26c88648f181f03fc00b3731f8174d97dc222 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb at smartsharesystems.com>
Date: Mon, 16 Jan 2023 14:07:23 +0100
Subject: [PATCH] net/mlx5: fix warning about copy length
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c19580fb8e9ad6f153d46f731ec7cd2050b3021b ]

Use RTE_PTR_ADD where copying to the offset of a field in a structure
holding multiple fields, to avoid compiler warnings with decorated
rte_memcpy.

Fixes: 16a7dbc4f690 ("net/mlx5: make flow modify action list thread safe")

Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 85dcc399c2..1069b84157 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5688,7 +5688,7 @@ flow_dv_modify_create_cb(void *tool_ctx, void *cb_ctx)
 				   "cannot allocate resource memory");
 		return NULL;
 	}
-	rte_memcpy(&entry->ft_type,
+	rte_memcpy(RTE_PTR_ADD(entry, offsetof(typeof(*entry), ft_type)),
 		   RTE_PTR_ADD(ref, offsetof(typeof(*ref), ft_type)),
 		   key_len + data_len);
 	if (entry->ft_type == MLX5DV_FLOW_TABLE_TYPE_FDB)
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.421415580 +0000
+++ 0026-net-mlx5-fix-warning-about-copy-length.patch	2024-03-18 12:58:39.271349065 +0000
@@ -1 +1 @@
-From c19580fb8e9ad6f153d46f731ec7cd2050b3021b Mon Sep 17 00:00:00 2001
+From f6a26c88648f181f03fc00b3731f8174d97dc222 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit c19580fb8e9ad6f153d46f731ec7cd2050b3021b ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 4badde1a9a..d434c678c8 100644
+index 85dcc399c2..1069b84157 100644
@@ -26 +27 @@
-@@ -6205,7 +6205,7 @@ flow_dv_modify_create_cb(void *tool_ctx, void *cb_ctx)
+@@ -5688,7 +5688,7 @@ flow_dv_modify_create_cb(void *tool_ctx, void *cb_ctx)


More information about the stable mailing list