Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp358078rwe; Tue, 18 Apr 2023 23:21:36 -0700 (PDT) X-Google-Smtp-Source: AKy350af1MkjqxxJG23ceRrjDPlQ18Q1d28/TPsdkf4DjICuhTzEgBHK3ZWlYBf2NixSEP4lsIGX X-Received: by 2002:a05:6870:207:b0:184:8496:98bc with SMTP id j7-20020a056870020700b00184849698bcmr2482147oad.4.1681885296310; Tue, 18 Apr 2023 23:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681885296; cv=none; d=google.com; s=arc-20160816; b=MliH9fYMLW2o47vutbGbMAIoVz7Wd0Ag+YSq3CIQRZPqY2atVR9O8sNilVrdbiKlKh lnvy1i/c5OvwZGC68zyZXvBV7NWCTyfG9qXVkikvcx36PXh0m76O8f3vFYIrQ0jjAh// ENsp268rD2wadSsj2uNyfXmzUXIc1QDCh4ZPcNW5yGrJ+1ArU6PG9DOvvAYYJvcBytZu 3g8nAK4pZ1LgmQTb4LM9UG9mjbqhNBeQpUdzrQpv2X7qHKXDF8omIkKm+nBea6BrPGl/ Pq4FzmyEsdKw/fdSACKd8NjS0ksi2l3V40TDZLtboDXs6LXNcoiCbCbdvdiu2pWE73Of fVww== 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=vZF+Ckk1yF654X/TsDitzXVCnh6PRkqBrDRqJewGbr4=; b=KKNEiPXhIS69cjKghRacckADMvGDSUMRauR/GRFwWIqwWEajoPX9hBx9abPtqugIOS oNr4Kodk8qt/R3/DSZntiZGGYdNWRkgLxCkzSEaZJK1l+Lig6qalEfEiPy5lO4qGIOAa 17NyORspmvzoXwRXqP72jalRPINMvfxjQw+aIxgvKoYwhBQ/V9hvMfmPkTm06YGbptwn nlEB7Kt2uNQnkJvJduQJ/vheuZqt6sQhUh8v9TW5F7Ao9zT9QWja03lngnKUo+0zBxCb aGfgZZlX80YyPKqzGO4iKCY2FPQv75uRTK+VwcWiphM5QNYX2aXQ8h8DBLbnmTryUMzH Faow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=dat2cIIV; 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 ev3-20020a056808290300b0037fa76dc7a6si15207081oib.264.2023.04.18.23.21.24; Tue, 18 Apr 2023 23:21:36 -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=dat2cIIV; 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 S231888AbjDSGUv (ORCPT + 99 others); Wed, 19 Apr 2023 02:20:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231844AbjDSGUp (ORCPT ); Wed, 19 Apr 2023 02:20:45 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF147619B; Tue, 18 Apr 2023 23:20:44 -0700 (PDT) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33J3qnRH021480; Tue, 18 Apr 2023 23:20:38 -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=vZF+Ckk1yF654X/TsDitzXVCnh6PRkqBrDRqJewGbr4=; b=dat2cIIViHfDNg1QtbPjp3EPaEfu2pd09CWgPk0ORWxctmb6ceC9XXEOPZ9girDBqJnk dWeaTpNTaGNopld/spp+Z9uM2fxal9U8zFKh7ow7LjZQ6xfdM+/I/eTdM1PCzH4Cn967 UTcoK5xSlYgTkGCGaPXW3nGFUfEk3fbv9WypS5zS5TS/YKn9uL7z9W35q+BOH3i4wi8e OOd/LUQFVdYh5AGvmmzG+/R3RgsjSw4DSgYL05JPrmVvRCg3p6azvrzoLohjwU+VSQne IXLHcrLVHXEOcoW94hcMwTEFOSz8X3SXEE1sg9qeB4YJDDaD3FkCpT+i/AbuSnSSQ4uD 7g== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3q28s0gmfs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 18 Apr 2023 23:20:38 -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; Tue, 18 Apr 2023 23:20:36 -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; Tue, 18 Apr 2023 23:20:36 -0700 Received: from hyd1425.marvell.com (unknown [10.29.37.83]) by maili.marvell.com (Postfix) with ESMTP id 93F3C3F7055; Tue, 18 Apr 2023 23:20:31 -0700 (PDT) From: Sai Krishna To: , , , , , , , , , , , , , CC: Ratheesh Kannoth , Sai Krishna Subject: [net PATCH v3 02/10] octeontx2-af: Fix start and end bit for scan config Date: Wed, 19 Apr 2023 11:50:10 +0530 Message-ID: <20230419062018.286136-3-saikrishnag@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230419062018.286136-1-saikrishnag@marvell.com> References: <20230419062018.286136-1-saikrishnag@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: dQbLKw41CkNeyYa0-SGDfrW5fXEbAa-4 X-Proofpoint-ORIG-GUID: dQbLKw41CkNeyYa0-SGDfrW5fXEbAa-4 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-04-19_02,2023-04-18_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 From: Ratheesh Kannoth Fix the NPC nibble start and end positions in the bit map. for_each_set_bit_from() needs start bit as one bit prior and end bit as one bit post position in the bit map 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 ++--- 1 file changed, 2 insertions(+), 3 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++; } -- 2.25.1