patch 'net/bnxt/tf_core: fix slice count in case of HA entry move' has been queued to stable release 23.11.3

Xueming Li xuemingl at nvidia.com
Sat Dec 7 09:00:12 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.3

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/10/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=c1606948da25d750aca4e3879c041fefa71286ef

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From c1606948da25d750aca4e3879c041fefa71286ef Mon Sep 17 00:00:00 2001
From: Sangtani Parag Satishbhai <parag-satishbhai.sangtani at broadcom.com>
Date: Thu, 7 Nov 2024 19:22:14 +0530
Subject: [PATCH] net/bnxt/tf_core: fix slice count in case of HA entry move
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 1190f2f8d5abf82c843ad071ad4c7d0aea202cce ]

When entries are moved during HA, a shared move function transfers
TCAM entries by using get/set message APIs, and the slice number of the
entry is required to accomplish the movement. The slice number is
calculated as the product of row_slice and entry size. Before calling
get/set message APIs, the source entry size should be updated with the
destination entry size; otherwise, it might corrupt the slice number field,
which may result in writing an incorrect entry. A fix is made which now
copies the entry size from the source to the destination before calling
get/set message APIs, ensuring the correct slice number is modified.

Fixes: 97435d7906d7 ("net/bnxt: update Truflow core")

Signed-off-by: Sangtani Parag Satishbhai <parag-satishbhai.sangtani at broadcom.com>
Reviewed-by: Sriharsha Basavapatna <sriharsha.basavapatna at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 .mailmap                                | 1 +
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 879d0fd81c..67ff5b21c6 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1264,6 +1264,7 @@ Sampath Peechu <speechu at cisco.com>
 Samuel Gauthier <samuel.gauthier at 6wind.com>
 Sandilya Bhagi <sbhagi at solarflare.com>
 Sangjin Han <sangjin at eecs.berkeley.edu>
+Sangtani Parag Satishbhai <parag-satishbhai.sangtani at broadcom.com>
 Sankar Chokkalingam <sankarx.chokkalingam at intel.com>
 Santoshkumar Karanappa Rastapur <santosh.rastapur at broadcom.com>
 Santosh Shukla <santosh.shukla at caviumnetworks.com> <sshukla at mvista.com>
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
index 9df2d2b937..130985f92a 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
@@ -1678,6 +1678,11 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex
 	uint8_t  key[CFA_TCAM_MGR_MAX_KEY_SIZE];
 	uint8_t  mask[CFA_TCAM_MGR_MAX_KEY_SIZE];
 	uint8_t  result[CFA_TCAM_MGR_MAX_KEY_SIZE];
+	/*
+	 * Copy entry size before moving else if
+	 * slice number is non zero and entry size is zero it will cause issues
+	 */
+	dst_row->entry_size = src_row->entry_size;

 	int rc;

@@ -1752,7 +1757,6 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex

 	ROW_ENTRY_SET(dst_row, dst_row_slice);
 	dst_row->entries[dst_row_slice] = entry_id;
-	dst_row->entry_size = src_row->entry_size;
 	dst_row->priority = src_row->priority;
 	ROW_ENTRY_CLEAR(src_row, entry->slice);
 	entry->row = dst_row_index;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-12-06 23:26:45.882001506 +0800
+++ 0054-net-bnxt-tf_core-fix-slice-count-in-case-of-HA-entry.patch	2024-12-06 23:26:43.963044828 +0800
@@ -1 +1 @@
-From 1190f2f8d5abf82c843ad071ad4c7d0aea202cce Mon Sep 17 00:00:00 2001
+From c1606948da25d750aca4e3879c041fefa71286ef Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 1190f2f8d5abf82c843ad071ad4c7d0aea202cce ]
@@ -17 +19,0 @@
-Cc: stable at dpdk.org
@@ -28 +30 @@
-index 4dbb8cf8a7..f293f89167 100644
+index 879d0fd81c..67ff5b21c6 100644
@@ -31 +33 @@
-@@ -1326,6 +1326,7 @@ Sampath Peechu <speechu at cisco.com>
+@@ -1264,6 +1264,7 @@ Sampath Peechu <speechu at cisco.com>
@@ -40 +42 @@
-index 349f52caba..33b1e4121e 100644
+index 9df2d2b937..130985f92a 100644
@@ -43 +45 @@
-@@ -1717,6 +1717,11 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex
+@@ -1678,6 +1678,11 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex
@@ -55 +57 @@
-@@ -1791,7 +1796,6 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex
+@@ -1752,7 +1757,6 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex


More information about the stable mailing list