Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3468419rwa; Tue, 23 Aug 2022 05:23:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR5SXVw5hotfPO60d39RPrKjjAhGaIPHXS2Flou6vhX9JQr39B3dJQrlr6vU8vSrxhPcEnUw X-Received: by 2002:aa7:dd49:0:b0:447:17c0:41a7 with SMTP id o9-20020aa7dd49000000b0044717c041a7mr2768591edw.305.1661257388470; Tue, 23 Aug 2022 05:23:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661257388; cv=none; d=google.com; s=arc-20160816; b=iX1XdzzZZBUUkt2Yd1o/mn3GU3HzEBm9WgUr10SzRzL/TC3rmtptO2c0qpCyh9ry1+ GXae4ds5CQUniXnZ6LUzoN7O7/t6mj/T05fftNEqwCTtXGLh8FxJT5rZ38B5WuISj4rr 4nAPAh1oIYITsmrnnJbwPBfrxOl1FIEgR/kkkEMFyw0Syf0MQSxSGRLMFWB11TWgxULu rkDude5PIi4RSPYhCnTYBYLcTF4JLWD0Z4Z1rKnQw6N6iNU4XfH1jc+rB8INIVKuWAgs uz2ibyYxr5LLS6uAEfSNk744Xcvg+n/nB71tw9Ej/LJfQoeLvid1W7wBLgqSlkwyBmLj WTow== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hGuak2QOwQR0UNs2R601ZBatViYRMCU9Op/LYeEu2vQ=; b=d4t5oypjF3dOreNLkceTE1liP5izmffMVWm8oAStqtY2zGZKAGkOwKpYBzDab+BbFK AOIa1hmvogsGhr8jgzisW/aL1A1+X6e6jJBn8njJMZW2so8KL0hT3mvG2erpDMf/6Fv4 u3g5UT9s22nI1/I7wjQmpzS+43vBZi83jyM0ymYL2wDmfGA7GMPtjVXSAY5LJ0pHaTqv ifuKbaoxRM7E0J/5wHbJEwSBI2ggbxgYZruah8+CmVgqRYFcu7L3QFxb62ITe1V1T2d0 QeCkvwf0+Xqq5QexQO2dzqBf2eVRLKT2unqAsxg4x6NrQYyd7E6xMQ6ynEj4rcwj4Akx xxMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kP0TJXni; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y14-20020a056402358e00b0044314474c80si2263865edc.566.2022.08.23.05.22.42; Tue, 23 Aug 2022 05:23:08 -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=@linuxfoundation.org header.s=korg header.b=kP0TJXni; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241255AbiHWJzH (ORCPT + 99 others); Tue, 23 Aug 2022 05:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241181AbiHWJvp (ORCPT ); Tue, 23 Aug 2022 05:51:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D21DE9F1A4; Tue, 23 Aug 2022 01:46:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D55F2614E9; Tue, 23 Aug 2022 08:45:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAB3BC433C1; Tue, 23 Aug 2022 08:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244329; bh=AOk+oevlxIEWe26QrP0aZwFVPDWgUz50rIsB56MoIl8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kP0TJXniWO+nAodBRPqbOs070VEu0Y11MsqFDSPlXEsXwV0z4ueSi0lHaLbGgOJD9 54ijxR6t6zhXhs5l/qiGUqES2dr13H3nOucxjoUIQHuFrAat2FQQJm30goUole71r1 nwGoWwD9B5rvbLBTnYEosU/d4H6ylOKXyAJ3WDy8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Subbaraya Sundeep , Sunil Goutham , Jakub Kicinski Subject: [PATCH 5.15 074/244] octeontx2-af: Fix key checking for source mac Date: Tue, 23 Aug 2022 10:23:53 +0200 Message-Id: <20220823080101.530596409@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: Subbaraya Sundeep commit c3c290276927a3ae79342a4e17ec0500c138c63a upstream. 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 Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- 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); }