patch 'net/mlx5/hws: enable multiple integrity items' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Sat Apr 13 14:48:56 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.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 04/15/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=86c66608c2ac4909fc88f28b26b90ae9a95ed8f1

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 86c66608c2ac4909fc88f28b26b90ae9a95ed8f1 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba at nvidia.com>
Date: Wed, 28 Feb 2024 11:50:55 +0200
Subject: [PATCH] net/mlx5/hws: enable multiple integrity items
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 8c178ac8ce81ab0cbd9e90fd7eb4a2b47fca7c2b ]

The integrity item uses the DW "oks1" in header layout. It includes the
all supported bits for both inner and outer. When item is integrity
type, the relevant bits are turned on and all DW is submitted.

When user provides more then single integrity item in same pattern, the
last one overrides the values were submitted before. This is problematic
when user wants to match integrity bits for both inner and outer in same
pattern, he cannot merge them into single item since rte_flow API
provides encapsulation level field to match either inner or outer.

This patch avoids the overriding values, when "oks1" is submitted,
operator "or" is used instead of regular set.

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

Signed-off-by: Michael Baum <michaelba 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 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index 34a5174aa8..c6918ef4f3 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -41,6 +41,10 @@
 				  (bit_off))); \
 	} while (0)
 
+/* Getter function based on bit offset and mask, for 32bit DW*/
+#define DR_GET_32(p, byte_off, bit_off, mask) \
+	((rte_be_to_cpu_32(*((const rte_be32_t *)(p) + ((byte_off) / 4))) >> (bit_off)) & (mask))
+
 /* Setter function based on bit offset and mask */
 #define DR_SET(p, v, byte_off, bit_off, mask) \
 	do { \
@@ -379,7 +383,7 @@ mlx5dr_definer_integrity_set(struct mlx5dr_definer_fc *fc,
 {
 	bool inner = (fc->fname == MLX5DR_DEFINER_FNAME_INTEGRITY_I);
 	const struct rte_flow_item_integrity *v = item_spec;
-	uint32_t ok1_bits = 0;
+	uint32_t ok1_bits = DR_GET_32(tag, fc->byte_off, fc->bit_off, fc->bit_mask);
 
 	if (v->l3_ok)
 		ok1_bits |= inner ? BIT(MLX5DR_DEFINER_OKS1_SECOND_L3_OK) :
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-04-13 20:43:06.767693920 +0800
+++ 0056-net-mlx5-hws-enable-multiple-integrity-items.patch	2024-04-13 20:43:04.987753945 +0800
@@ -1 +1 @@
-From 8c178ac8ce81ab0cbd9e90fd7eb4a2b47fca7c2b Mon Sep 17 00:00:00 2001
+From 86c66608c2ac4909fc88f28b26b90ae9a95ed8f1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 8c178ac8ce81ab0cbd9e90fd7eb4a2b47fca7c2b ]
@@ -20 +22,0 @@
-Cc: stable at dpdk.org
@@ -30 +32 @@
-index e036aca781..0e15aafb8a 100644
+index 34a5174aa8..c6918ef4f3 100644
@@ -33 +35 @@
-@@ -44,6 +44,10 @@
+@@ -41,6 +41,10 @@
@@ -44 +46 @@
-@@ -509,7 +513,7 @@ mlx5dr_definer_integrity_set(struct mlx5dr_definer_fc *fc,
+@@ -379,7 +383,7 @@ mlx5dr_definer_integrity_set(struct mlx5dr_definer_fc *fc,


More information about the stable mailing list