patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
To: dev@dpdk.org
Cc: Shahaji Bhosle <sbhosle@broadcom.com>,
	stable@dpdk.org,
	Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>,
	Farah Smith <farah.smith@broadcom.com>,
	Kishore Padmanabha <kishore.padmanabha@broadcom.com>,
	Shuanglin Wang <shuanglin.wang@broadcom.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>
Subject: [PATCH v8 02/47] net/bnxt: tf_core: tcam manager data corruption
Date: Thu,  7 Nov 2024 19:22:09 +0530	[thread overview]
Message-ID: <20241107135254.1611676-3-sriharsha.basavapatna@broadcom.com> (raw)
In-Reply-To: <20241107135254.1611676-1-sriharsha.basavapatna@broadcom.com>

From: Shahaji Bhosle <sbhosle@broadcom.com>

Max entries per session were not getting initialized
to 0, when the sessions were closed.
Reset max entries counter session when the session is initialized

Fixes: 97435d7906d7 ("net/bnxt: update Truflow core")
Cc: stable@dpdk.org

Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
index f26d93e7a9..9df2d2b937 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
@@ -909,6 +909,7 @@ cfa_tcam_mgr_init(int sess_idx, enum cfa_tcam_mgr_device_type type,
 	/* Now calculate the max entries per table and global max entries based
 	 * on the updated table limits.
 	 */
+	cfa_tcam_mgr_max_entries[sess_idx] = 0;
 	for (dir = 0; dir < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx]); dir++)
 		for (tbl_type = 0;
 		     tbl_type < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx][dir]);
@@ -958,8 +959,8 @@ cfa_tcam_mgr_init(int sess_idx, enum cfa_tcam_mgr_device_type type,
 	if (parms != NULL)
 		parms->max_entries = cfa_tcam_mgr_max_entries[sess_idx];
 
-	CFA_TCAM_MGR_LOG(INFO, "Global TCAM table initialized for sess_idx %d.\n",
-			 sess_idx);
+	CFA_TCAM_MGR_LOG(DEBUG, "Global TCAM table initialized for sess_idx %d max entries %d.\n",
+			 sess_idx, cfa_tcam_mgr_max_entries[sess_idx]);
 
 	return 0;
 }
-- 
2.39.3


  parent reply	other threads:[~2024-11-07 13:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241107135254.1611676-1-sriharsha.basavapatna@broadcom.com>
2024-11-07 13:52 ` [PATCH v8 01/47] net/bnxt: tf_core: fix wc tcam multi slice delete issue Sriharsha Basavapatna
2024-11-07 13:52 ` Sriharsha Basavapatna [this message]
2024-11-07 13:52 ` [PATCH v8 04/47] net/bnxt: tf_core: Thor TF EM key size check Sriharsha Basavapatna
2024-11-07 13:52 ` [PATCH v8 07/47] net/bnxt: tf_core: fix slice count in case of HA entry move Sriharsha Basavapatna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241107135254.1611676-3-sriharsha.basavapatna@broadcom.com \
    --to=sriharsha.basavapatna@broadcom.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=farah.smith@broadcom.com \
    --cc=kishore.padmanabha@broadcom.com \
    --cc=sbhosle@broadcom.com \
    --cc=shuanglin.wang@broadcom.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).