From patchwork Wed May 3 07:09:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Krishna Gajula X-Patchwork-Id: 89587 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1134490vqo; Wed, 3 May 2023 00:20:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4iWKN7FRUvQtsluq6Dcnz7yQyxrPlIO7hfTR/JFWZIfmDo8Sn9iXS8I+a91bYkNLZGsVBb X-Received: by 2002:a17:90b:4c43:b0:247:6c32:37e5 with SMTP id np3-20020a17090b4c4300b002476c3237e5mr21144666pjb.13.1683098426062; Wed, 03 May 2023 00:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683098426; cv=none; d=google.com; s=arc-20160816; b=oglAQGSq1ZJ6rxWwClK0Jybp4wLF5/t76CEBjr9vSmA8GuKtcZSst3qGZCM1LfuDkH kDk8avN/6S2zo7R40wEP5JRNGY3iUd+AfVItGDxJchuox28jATvmF92bOVc6z1UJHAEL 9f2vtg5UMZYJupGWJWDAkz1UDVdfPdW6r3uMlIrU1nkKP0jPPm6BlyN0cKcSEbJyAU6E fcAcaxhhcXU/yhSu1PPb5aXsthQxJr18afBvOu2aLUe1SUz3Rm6mSVpsUvfk5pF5/ic/ ZfUCG64Q1OvGyfYMeDU2Drt3qGlcatMeTKTxdjNEs4lAoaZn1SM5XGYB4Ch8TBkzuLBH Un5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oeASTIACqjLqjgo40S/3synelPRRKm5Hez+ARr3FyuI=; b=f+hqRLPYl5piO12Zrp6Il7vwdRjTZLD78p7pODw8B29iut6LVEz0J7Rumvi5dJTaBu 1erDtHHenUgL8f25aVHslkQGLVwPxZQh9LTINCeTphPwU3A5VIVbvPbcd/q/+SGd+/y6 8Xz4+SX+qGfzkm7tc5/81kRh3wokpU4npClTXYvoCqzf0w5UG9tKe2RI1Cdh5AFs4Vwn OXAREJGEQOeFW+76L1H+mwQlyRSXeFccbctUbfpMwmbmkGxkCXDHn/7xZOrLJGfvaVcL KJ5kOUb5n5AU7qHhe3qtHvGItxlM13TjUMYFoG26m8+baO7EOj6dT5EegGDh/x9M2/UN JudA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=K1zeGR+Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w11-20020a17090a4f4b00b0024e0361745csi868790pjl.186.2023.05.03.00.20.10; Wed, 03 May 2023 00:20:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=K1zeGR+Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229719AbjECHK2 (ORCPT + 99 others); Wed, 3 May 2023 03:10:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229686AbjECHKW (ORCPT ); Wed, 3 May 2023 03:10:22 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50065272A; Wed, 3 May 2023 00:10:18 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3436ACSu003519; Wed, 3 May 2023 00:10:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=oeASTIACqjLqjgo40S/3synelPRRKm5Hez+ARr3FyuI=; b=K1zeGR+Ze2e6EVuRB8VBScy+D1zT9DwVQ7IjsLHvApDGvr1QIHAE7gqb3fZKQkXFRs7A lDtCu1N/ObIy1Pty883QadcvHIWhSOKvLrYU3/K1ShNMkEXDhgO/XN5VasH0maZgywBh njJv8KeGNul1b2hxUPnS6nTLiyfL7Lh0V3IWGnBwxharGbK+8xNoaEpu5PmQnVulZqSW +ZUiCCIKr7eYiMNAGUGTenyVVGxxLiNaJ45660I/9AqeOTSDqmSaGJvNi1yzGLZP6x8o KM1zC1xN106yjSGi+i2lj79li3f+2g0n78ta9lxn9O/Y3JF9Fd7Ddz3rxUBGfDUXOGPd 8A== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3q92rp3m7g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 03 May 2023 00:10:10 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 3 May 2023 00:10:08 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 3 May 2023 00:10:07 -0700 Received: from hyd1425.marvell.com (unknown [10.29.37.83]) by maili.marvell.com (Postfix) with ESMTP id 68EE73F70B1; Wed, 3 May 2023 00:10:01 -0700 (PDT) From: Sai Krishna To: , , , , , , , , , , , , , CC: Ratheesh Kannoth , Sai Krishna Subject: [net PATCH v5 03/11] octeontx2-af: Fix depth of cam and mem table. Date: Wed, 3 May 2023 12:39:36 +0530 Message-ID: <20230503070944.960190-4-saikrishnag@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230503070944.960190-1-saikrishnag@marvell.com> References: <20230503070944.960190-1-saikrishnag@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: BhsQlXW0er5M99E_iJ6uOqggZ91SIv2i X-Proofpoint-GUID: BhsQlXW0er5M99E_iJ6uOqggZ91SIv2i X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-03_04,2023-04-27_01,2023-02-09_01 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764856615420722881?= X-GMAIL-MSGID: =?utf-8?q?1764856615420722881?= From: Ratheesh Kannoth In current driver, NPC cam and mem table sizes are read from wrong register offset. This patch fixes the register offset so that correct values are populated on read. Fixes: b747923afff8 ("octeontx2-af: Exact match support") Signed-off-by: Ratheesh Kannoth Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Reviewed-by: Simon Horman --- drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c index 20ebb9c95c73..6597af84aa36 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c @@ -1868,9 +1868,9 @@ int rvu_npc_exact_init(struct rvu *rvu) rvu->hw->table = table; /* Read table size, ways and depth */ - table->mem_table.depth = FIELD_GET(GENMASK_ULL(31, 24), npc_const3); table->mem_table.ways = FIELD_GET(GENMASK_ULL(19, 16), npc_const3); - table->cam_table.depth = FIELD_GET(GENMASK_ULL(15, 0), npc_const3); + table->mem_table.depth = FIELD_GET(GENMASK_ULL(15, 0), npc_const3); + table->cam_table.depth = FIELD_GET(GENMASK_ULL(31, 24), npc_const3); dev_dbg(rvu->dev, "%s: NPC exact match 4way_2k table(ways=%d, depth=%d)\n", __func__, table->mem_table.ways, table->cam_table.depth);