Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE405C19F28 for ; Wed, 3 Aug 2022 07:54:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237349AbiHCHyp (ORCPT ); Wed, 3 Aug 2022 03:54:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237318AbiHCHyk (ORCPT ); Wed, 3 Aug 2022 03:54:40 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9831239BB2 for ; Wed, 3 Aug 2022 00:54:38 -0700 (PDT) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2736NBoi020589; Wed, 3 Aug 2022 00:54:33 -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-type; s=pfpt0220; bh=tUVIKbvggl8NBGQ0bBEyNzhE8tfFQbK0/jbOhPKp7zo=; b=Xav8fkHvzLzhzNpL7codInKzywF1aeSv2yfQzg0qWbvirTqNPj7cAjw2AlgVje92cWZc SKDRGfMiINmZp7ZB9RN3keuAR8bIw4Iv2Qhc6o/hncLy+v6F564RDDLIR7WA/Z/zxkgf C/O1O5582wyq73ueKjmAQlCkWyelgR9kNGOLdbPJ4E0Gw/guZ5iclnRD8+I/vQ7gdegF +NtZvZbdyGTebyfyhrwmSTbSJFfR8/eQdXggsA3gkX1QkVPp682Ug2Dxb2H5lDyL02fu IkrUI5x7CEobsuZSaMpFARABXsuFlxf9fMBoXVjExBWthki6lFUBmexDf5WKxPafMhDQ ig== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3hq19kvqex-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 03 Aug 2022 00:54:33 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 3 Aug 2022 00:54:32 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Wed, 3 Aug 2022 00:54:32 -0700 Received: from hyd1358.marvell.com (unknown [10.29.37.11]) by maili.marvell.com (Postfix) with ESMTP id BCA4A3F7057; Wed, 3 Aug 2022 00:54:29 -0700 (PDT) From: Subbaraya Sundeep To: , , , , , CC: Subbaraya Sundeep Subject: [net v4 PATCH 4/4] octeontx2-af: Fix key checking for source mac Date: Wed, 3 Aug 2022 13:24:15 +0530 Message-ID: <1659513255-28667-5-git-send-email-sbhatta@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1659513255-28667-1-git-send-email-sbhatta@marvell.com> References: <1659513255-28667-1-git-send-email-sbhatta@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: dZ2KcRCrLzytmB4VH129K4_SIkBF5W77 X-Proofpoint-GUID: dZ2KcRCrLzytmB4VH129K4_SIkBF5W77 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-03_03,2022-08-02_01,2022-06-22_01 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Given a field with its location/offset in input packet, the key checking logic verifies whether extracting the field can be supported or not based on the mkex profile loaded in hardware. This logic is wrong wrt source mac and this patch fixes that. Fixes: 9b179a960a96 ("octeontx2-af: Generate key field bit mask from KEX profile") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 19c53e5..64654bd 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c @@ -445,7 +445,8 @@ do { \ NPC_SCAN_HDR(NPC_VLAN_TAG1, NPC_LID_LB, NPC_LT_LB_CTAG, 2, 2); NPC_SCAN_HDR(NPC_VLAN_TAG2, NPC_LID_LB, NPC_LT_LB_STAG_QINQ, 2, 2); NPC_SCAN_HDR(NPC_DMAC, NPC_LID_LA, la_ltype, la_start, 6); - NPC_SCAN_HDR(NPC_SMAC, NPC_LID_LA, la_ltype, la_start, 6); + /* SMAC follows the DMAC(which is 6 bytes) */ + NPC_SCAN_HDR(NPC_SMAC, NPC_LID_LA, la_ltype, la_start + 6, 6); /* PF_FUNC is 2 bytes at 0th byte of NPC_LT_LA_IH_NIX_ETHER */ NPC_SCAN_HDR(NPC_PF_FUNC, NPC_LID_LA, NPC_LT_LA_IH_NIX_ETHER, 0, 2); } -- 2.7.4