Message ID | 20240830140049.1715230-8-sriharsha.basavapatna@broadcom.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Ajit Khaparde |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 03FA2458A8; Fri, 30 Aug 2024 15:52:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F31342EC2; Fri, 30 Aug 2024 15:51:19 +0200 (CEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 3737942EBA for <dev@dpdk.org>; Fri, 30 Aug 2024 15:51:17 +0200 (CEST) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-20223b5c1c0so17299975ad.2 for <dev@dpdk.org>; Fri, 30 Aug 2024 06:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1725025876; x=1725630676; 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=5/zr++Xm/i4f1sFWZh10kCZlh5B8aahCig3NDoiGzz4=; b=AqQHEvq+zYE5yXT37/+pP4vCefcGfEqtf85lLitQcW8HYFKe+GDNCTFfM3VXHRF9+m DlLHYWc/zgckBUbW59TfLltoWFXci1Gsv2Lds+izrrBnAzNRVl09FhAoxo7W9bLRM2aQ J+EErwRlG5W/mZn2MZ/Ous92ogRA7+4mI/wrE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725025876; x=1725630676; 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=5/zr++Xm/i4f1sFWZh10kCZlh5B8aahCig3NDoiGzz4=; b=FAqb9hd9j//HG/f1rMC0zogziAFvwTufxyIzantHkauCmdeULcIEvkjM8hfe5NkL8h K+15kqoYNeWooQI9Ma3SvgmZ9U0xb3/m48Lek1CyhcDdp54cW6091EMG9yN8n7ASlT8J 2YQ1gh0L7uS0dzXlrxvOd641TVFyQfmgNmP+ETLyGIaMlX/P3EFepEKyDYmdA6/XfUsy hcGJTh4bUfoO+9xhDmOSMAM8uZ2i4tjawy57RtZvaRy2qZEE6u0wblHpaaFTmNw13U0o BtkGxZjqppGVDQrGpShRDY3KwxaLU9ZaU3r7EXaBbQGI+rDaP8rkwPG5OHy+IcxQjuGm KyeA== X-Gm-Message-State: AOJu0YwoQW9DgQBtm0KBO+jiO1viHADQ9jpTPH8KkdB35bRMSbO+hHJa T21OMInafms2jgehN3cpo5xB8U87H3Aw+kQ1Q2sqyWs4bJuI/sDYV99jTdTYiaekdw7g1ZERTXd GimCgOrTNEV/iCUsekmm1lLbgKOndEsgHmtyX6IViS2qfkFY/nyaT2YKHStfh/uAYiMOZLUcx2t jkxnGQ58L7J96XqWJU9JEiT6wi2MIl3xUEjZs4KieO7QpS X-Google-Smtp-Source: AGHT+IGFDCMZl0RlpijRYJcMqWhR05jpKEbLbu7iRPQ+v21gjTc8Kxd6cLuYBAgqVquj0h7tMF7Szw== X-Received: by 2002:a17:902:db0d:b0:1fd:67c2:f975 with SMTP id d9443c01a7336-2050c390ce2mr65706555ad.29.1725025875798; Fri, 30 Aug 2024 06:51:15 -0700 (PDT) Received: from dhcp-10-123-154-23.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-205155658dfsm27067145ad.297.2024.08.30.06.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 06:51:15 -0700 (PDT) From: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> To: dev@dpdk.org Cc: Sangtani Parag Satishbhai <parag-satishbhai.sangtani@broadcom.com>, Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> Subject: [PATCH 07/47] net/bnxt: tf_core: fix slice count in case of HA entry move Date: Fri, 30 Aug 2024 19:30:09 +0530 Message-Id: <20240830140049.1715230-8-sriharsha.basavapatna@broadcom.com> X-Mailer: git-send-email 2.39.0.189.g4dbebc36b0 In-Reply-To: <20240830140049.1715230-1-sriharsha.basavapatna@broadcom.com> References: <20240830140049.1715230-1-sriharsha.basavapatna@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
TruFlow update for Thor2
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
Commit Message
Sriharsha Basavapatna
Aug. 30, 2024, 2 p.m. UTC
From: Sangtani Parag Satishbhai <parag-satishbhai.sangtani@broadcom.com> 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. Signed-off-by: Sangtani Parag Satishbhai <parag-satishbhai.sangtani@broadcom.com> Reviewed-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> --- drivers/net/bnxt/tf_core/cfa_tcam_mgr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c index 349f52caba..33b1e4121e 100644 --- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c +++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c @@ -1717,6 +1717,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; @@ -1791,7 +1796,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;