patch 'net/mlx5: fix SQ flow item size' has been queued to stable release 22.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Nov 12 23:07:22 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.7

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/14/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/f2a35164aab320bffe2240fc837a9461a66d2adf

Thanks.

Luca Boccassi

---
>From f2a35164aab320bffe2240fc837a9461a66d2adf Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Sun, 27 Oct 2024 16:09:40 +0200
Subject: [PATCH] net/mlx5: fix SQ flow item size

[ upstream commit 7c66fa49ddcce1981c2fa3a0c024ec82b036639c ]

Expand the size of struct mlx5_rte_flow_item_sq to 64 bits on 64-bit
systems. This aligns with DPDK's assumption that PMD private data has
pointer size when copying flow items with rte_flow_conv.[1]

Previously, the struct was defined as 32 bits, causing DPDK to
incorrectly assign an additional 32 bits when copying
MLX5_RTE_FLOW_ITEM_TYPE_SQ items on 64-bit systems.

This fix ensures proper memory alignment and prevents potential
buffer overflows when DPDK copies MLX5_RTE_FLOW_ITEM_TYPE_SQ items.

[1]:
commit 6cf72047332b ("ethdev: support flow elements with variable length")

Fixes: 75a00812b18f ("net/mlx5: add hardware steering item translation")

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 4f3a216ed4..1aff287616 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -117,6 +117,9 @@ struct mlx5_flow_action_copy_mreg {
 /* Matches on source queue. */
 struct mlx5_rte_flow_item_sq {
 	uint32_t queue; /* DevX SQ number */
+#ifdef RTE_ARCH_64
+	uint32_t reserved;
+#endif
 };
 
 /* Feature name to allocate metadata register. */
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.087437604 +0000
+++ 0012-net-mlx5-fix-SQ-flow-item-size.patch	2024-11-12 22:06:58.655307014 +0000
@@ -1 +1 @@
-From 7c66fa49ddcce1981c2fa3a0c024ec82b036639c Mon Sep 17 00:00:00 2001
+From f2a35164aab320bffe2240fc837a9461a66d2adf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7c66fa49ddcce1981c2fa3a0c024ec82b036639c ]
+
@@ -21 +22,0 @@
-Cc: stable at dpdk.org
@@ -30 +31 @@
-index 9a8eccdd25..f5866af231 100644
+index 4f3a216ed4..1aff287616 100644
@@ -33 +34 @@
-@@ -168,6 +168,9 @@ struct mlx5_flow_action_copy_mreg {
+@@ -117,6 +117,9 @@ struct mlx5_flow_action_copy_mreg {
@@ -42 +43 @@
- /* Map from registers to modify fields. */
+ /* Feature name to allocate metadata register. */


More information about the stable mailing list