Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp928717rwl; Wed, 29 Mar 2023 10:11:13 -0700 (PDT) X-Google-Smtp-Source: AKy350ai0kg8FhN9toS/2+eiuLjzYcmEdO6mthBFfGYyFytn4l24lxvqbMHBk+67ayFoZgcjGcSx X-Received: by 2002:a17:906:4dd7:b0:92e:41ee:7564 with SMTP id f23-20020a1709064dd700b0092e41ee7564mr19773160ejw.65.1680109873689; Wed, 29 Mar 2023 10:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680109873; cv=none; d=google.com; s=arc-20160816; b=bCuGW+xVBQevABm6GYx/uKNWEGREZLz2FxrxMQhPEZdlyFSNtHnGbnW3xMj23ZVs8J gCs5GDftLXGwt6Visj4+Q6um/9QP5f+cU6bP0ILaAHYV/kIpLete8+Xz/l56aWidy9+l 52oXCFtochFEkxfsppb678yRU7TrDP4Jd75G4o3aKOaZPkZ4pk0pGJk2/UQ865dFghOs FRfS9LjAVpLsFPRN2MjXhHUwEmpFYNiHPRN4xk0bMWQNTJLDLa3UWT1kw/A9LQz4D4j2 TFEE5xsFgQwqCna3qnKpiTYAyiIbYfQQWY0kBXN8NPio/FE5QOTO+VVHBgxAOBFMEgxT Uw8A== 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=2eugfjHN5cEXVXyZBKU/nW9nBVOQy0d2Nhqol6lbOzo=; b=AS67tO/s4Ski2aCiAFOvPttJbnMMpS6B/n8kufSMbW7Z+OfUTerRO0SfRIw+pCjY0d mi7YdEOzyyZR7XtG0dd8pvDEEq3qWm+t7oWeu+3CCPLElldSiAtLx3QPFxcs6ajHYdF6 5s9b2MOkwwFc0iTEBV44oeq4YoUOnEuWpaK2kNb+kaRblfZlcqcS3l+oU6bcnUZAj+CR kf9ako3s2UV/Y6zeuXb543PIC+Apn0sfYvOdjtSkehk+nDx/hQDk3RQ+R9O83noAgvKc p0naZBBSrf93MOtlFDoJHA1aPgJyUoMzeFacqbdfkTMTaYS0/DYipbSkxjhNg8AFF1bo xTHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=hhaVfbwK; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lh6-20020a170906f8c600b0092419a141fbsi17056658ejb.726.2023.03.29.10.10.48; Wed, 29 Mar 2023 10:11:13 -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=hhaVfbwK; 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 S231565AbjC2RKc (ORCPT + 99 others); Wed, 29 Mar 2023 13:10:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231387AbjC2RKP (ORCPT ); Wed, 29 Mar 2023 13:10:15 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A649F4C3F; Wed, 29 Mar 2023 10:09:26 -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 32TFobCW032164; Wed, 29 Mar 2023 10:09:17 -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=2eugfjHN5cEXVXyZBKU/nW9nBVOQy0d2Nhqol6lbOzo=; b=hhaVfbwKa+NWeK2/vViTVHmiNZl08W2IlkO+GDC1l0cpk8s7l/p4msTkHAaMsaWLmzM5 QID9IDQOVMdVxQW8M80TC04oLR3te3F1twB391GCE2rqmpGEiptxsCJzPbdMstSJnU3J d9kKkfeLRtAbs3ur129i9AxZK7S62U2lvEAEn4S1M+aqzwC3rLohx3Dx4Xzot8GOgRjR j3IfuU/0JGmSu0hAR4PMgX6afNavxVkOe+9s7vhMHimo+pVYx9KEN7yhzkfWmxfVrYRx +OLw1WkvBRKvvS8uoGjt9bBELuM+0FLHjYvIweNo/j5tocAzWdSg5cyGh2pUiYwXQTeg UQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3pmhc4a0jv-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 29 Mar 2023 10:09:17 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 29 Mar 2023 10:06:50 -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, 29 Mar 2023 10:06:50 -0700 Received: from hyd1425.marvell.com (unknown [10.29.37.83]) by maili.marvell.com (Postfix) with ESMTP id 9C7643F704C; Wed, 29 Mar 2023 10:06:47 -0700 (PDT) From: Sai Krishna To: , , , , , , , CC: Ratheesh Kannoth , Sai Krishna Subject: [net PATCH 2/7] octeontx2-af: Fix start and end bit for scan config Date: Wed, 29 Mar 2023 22:36:14 +0530 Message-ID: <20230329170619.183064-3-saikrishnag@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329170619.183064-1-saikrishnag@marvell.com> References: <20230329170619.183064-1-saikrishnag@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: Jd1NHlX4LXaXnVhVrlcuWx9M8seRJMed X-Proofpoint-GUID: Jd1NHlX4LXaXnVhVrlcuWx9M8seRJMed 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-03-29_10,2023-03-28_02,2023-02-09_01 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 From: Ratheesh Kannoth Fix the NPC nibble start and end positions in the bit map. Fix the depth of cam and mem table configuration. Increased the field size of dmac filter flows as cn10kb support large in number. Fixes: b747923afff8 ("octeontx2-af: Exact match support") Signed-off-by: Ratheesh Kannoth Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna --- drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 5 ++--- drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 4 ++-- drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c index 006beb5cf98d..27603078689a 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c @@ -593,9 +593,8 @@ static int npc_scan_kex(struct rvu *rvu, int blkaddr, u8 intf) * exact match code. */ masked_cfg = cfg & NPC_EXACT_NIBBLE; - bitnr = NPC_EXACT_NIBBLE_START; - for_each_set_bit_from(bitnr, (unsigned long *)&masked_cfg, - NPC_EXACT_NIBBLE_START) { + bitnr = NPC_EXACT_NIBBLE_START - 1; + for_each_set_bit_from(bitnr, (unsigned long *)&masked_cfg, NPC_EXACT_NIBBLE_END + 1) { npc_scan_exact_result(mcam, bitnr, key_nibble, intf); key_nibble++; } 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); diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h index 3d22cc6a2804..99cdc871b59c 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h @@ -335,11 +335,11 @@ struct otx2_flow_config { #define OTX2_PER_VF_VLAN_FLOWS 2 /* Rx + Tx per VF */ #define OTX2_VF_VLAN_RX_INDEX 0 #define OTX2_VF_VLAN_TX_INDEX 1 - u16 max_flows; - u8 dmacflt_max_flows; u32 *bmap_to_dmacindex; unsigned long *dmacflt_bmap; struct list_head flow_list; + u32 dmacflt_max_flows; + u16 max_flows; }; struct otx2_tc_info { -- 2.25.1