From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0A61845C9A for ; Thu, 7 Nov 2024 14:42:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 994D242F09; Thu, 7 Nov 2024 14:42:36 +0100 (CET) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 65CF842F09 for ; Thu, 7 Nov 2024 14:42:35 +0100 (CET) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-71e467c3996so720723b3a.2 for ; Thu, 07 Nov 2024 05:42:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1730986954; x=1731591754; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hdZFHzhqZbUExHLoggJqJQeYouBHs2FoTqmotrk0U28=; b=RYNLkaj8ugnwOOxrlklASwyYWv0WMMY3vN1ZrHI7fc9HBynDfN2TflhDlfOJU8MawY m5kcpEg+ho9dYhywPCyMF0KU4Eoo/xP6CIYbAuMPIZBCWZ2QS+bd2YKLDPviy5251PIj 7LweOA+g7yB68eNOyhB27cXIF4cihsU8t2B3w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730986954; x=1731591754; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hdZFHzhqZbUExHLoggJqJQeYouBHs2FoTqmotrk0U28=; b=GnRH4fMsguhJG07APak0EaU8G9SQ2RP2rqaHmlDKic3Ehmrr3iI7QhXYqWEQFOp6JE nC5tv02YpPwjnXC5YywKailg5NRfsgKHmZTRDc7tYeO6YegNiV460AVqpQQb9KF/0d3d 9GKI0ni9ZMYpN18x17tzE5FrGQxm2+r0hJtj/YRGloJij2iSZr6mQKsnAYHtLJsl62c4 En2ORXb79KnCEPJKOYzinkS8YiGVqNFsZnFVZYnTJ8QteX5QewBDXZIb8I/pOq9dB1Mb SzXMS4quRyMSDMyh/GsWo+goxVWpHXOPvMzCwzltV7tclib3twI1EbYvoFa9I5ZbsuIk fb5g== X-Forwarded-Encrypted: i=1; AJvYcCVlBw4bmGMjiAVRAs7IMokfXYnOISnVMMb/cCymtMXjHKaaDoRAfyG36vkRbKavzszXiVLAlWw=@dpdk.org X-Gm-Message-State: AOJu0YwyURVcHV8eLa7IRd0Ylawkj9W4/qghzGT68bbKFEtdWZDHl9qX 2+VaEid5OzThcrPEogRw/o9JH4ZXObZGj+ikbNHJlKaoH9IPn9/Tjtf+P+fMMA== X-Google-Smtp-Source: AGHT+IH3pkHyTrphPvzaykQ21t7bePG37TK9dyA6PKRQzBywRY75ucV2vxmpylGbPazix3Wohlu6mA== X-Received: by 2002:a05:6a20:7f92:b0:1db:ed27:ea27 with SMTP id adf61e73a8af0-1dbed27f262mr15691683637.8.1730986954338; Thu, 07 Nov 2024 05:42:34 -0800 (PST) Received: from dhcp-10-123-154-23.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e9a5f52969sm1409878a91.2.2024.11.07.05.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 05:42:33 -0800 (PST) From: Sriharsha Basavapatna To: dev@dpdk.org Cc: Shahaji Bhosle , stable@dpdk.org, Sriharsha Basavapatna , Farah Smith , Kishore Padmanabha , Shuanglin Wang , Ajit Khaparde Subject: [PATCH v8 02/47] net/bnxt: tf_core: tcam manager data corruption Date: Thu, 7 Nov 2024 19:22:09 +0530 Message-Id: <20241107135254.1611676-3-sriharsha.basavapatna@broadcom.com> X-Mailer: git-send-email 2.39.0.189.g4dbebc36b0 In-Reply-To: <20241107135254.1611676-1-sriharsha.basavapatna@broadcom.com> References: <20241107135254.1611676-1-sriharsha.basavapatna@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Shahaji Bhosle 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 Signed-off-by: Sriharsha Basavapatna Reviewed-by: Farah Smith Reviewed-by: Kishore Padmanabha Reviewed-by: Shuanglin Wang Reviewed-by: Ajit Khaparde --- 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