patch 'net/mlx5: fix offset size in conntrack flow action' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:12:07 CET 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 12/13/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=b5913482ec13aaeb385a5d7ac7e7f4b89077b4a1

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From b5913482ec13aaeb385a5d7ac7e7f4b89077b4a1 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski at nvidia.com>
Date: Mon, 20 Nov 2023 10:24:57 +0200
Subject: [PATCH] net/mlx5: fix offset size in conntrack flow action
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 04aa27164533702ca5b9b00bd78aff39c816e7af ]

In mlx5 PMD, struct mlx5_aso_ct_action represents a single ASO CT object
inside a ASO CT bulk, which is used to implement conntrack flow action.
offset field, which is 16 bits wide, in this struct represents
an offset of the given object inside a bulk.

When SW Steering flow engine is used, ASO CT bulks are allocated on
demand, each having 64 objects. In this case offset field can fit any
valid object offset.

When HW Steering flow engine is used, a single ASO CT bulk is allocated
during flow engine configuration. Since HW supports bulks bigger
than 2^16 this offset field is too small to fit all valid values.
This causes some ASO CT objects to be incorrectly reused on multiple
connections, when more than 2^16 conntrack flow actions are used.

This patch fixes this behavior. offset field size is increased
to 32 bits.

Fixes: 463170a7c934 ("net/mlx5: support connection tracking with HWS")

Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Acked-by: Ori Kam <orika at nvidia.com>
---
 drivers/net/mlx5/mlx5.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index deb9959f67..ba7c4441e5 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1245,7 +1245,7 @@ struct mlx5_aso_ct_action {
 	/* General action object for reply dir. */
 	void *dr_action_rply;
 	uint32_t refcnt; /* Action used count in device flows. */
-	uint16_t offset; /* Offset of ASO CT in DevX objects bulk. */
+	uint32_t offset; /* Offset of ASO CT in DevX objects bulk. */
 	uint16_t peer; /* The only peer port index could also use this CT. */
 	enum mlx5_aso_ct_state state; /* ASO CT state. */
 	bool is_original; /* The direction of the DR action to be used. */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:26.396849300 +0800
+++ 0102-net-mlx5-fix-offset-size-in-conntrack-flow-action.patch	2023-12-11 17:56:23.217652300 +0800
@@ -1 +1 @@
-From 04aa27164533702ca5b9b00bd78aff39c816e7af Mon Sep 17 00:00:00 2001
+From b5913482ec13aaeb385a5d7ac7e7f4b89077b4a1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 04aa27164533702ca5b9b00bd78aff39c816e7af ]
@@ -25 +27,0 @@
-Cc: stable at dpdk.org
@@ -34 +36 @@
-index 76bf7d0f4f..263ebead7f 100644
+index deb9959f67..ba7c4441e5 100644
@@ -37 +39 @@
-@@ -1286,7 +1286,7 @@ struct mlx5_aso_ct_action {
+@@ -1245,7 +1245,7 @@ struct mlx5_aso_ct_action {


More information about the stable mailing list