Message ID | 20221117213114.699375-2-steen.hegelund@microchip.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp637162wrr; Thu, 17 Nov 2022 13:45:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf6EXBcd1PolHJGH427720lsyhjv7m9liUWRuUlgSS6dtdJf2Dd5OSrwxz+EjazUFawsgtoz X-Received: by 2002:a63:24c3:0:b0:476:e84c:ab61 with SMTP id k186-20020a6324c3000000b00476e84cab61mr3918376pgk.471.1668721524395; Thu, 17 Nov 2022 13:45:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668721524; cv=none; d=google.com; s=arc-20160816; b=aMV3+BWmEVYn+5NBxcplmUkZMdw2P0m9DsTPK8t4SmI1JlYokKae3H9uRbXwJevxVq 2n1gypTFXCTrczBQVekPSnrhi09Ac6+wsI5yRdToQTcjyx301sonbDcODDwLw6pdgVH2 qOio+btNcbgwDba4LLB7mPuflsk+QmCKpmSAwoqFORDgIrXH5ehExNsQA+xYo2RhQPky 4nj+s9U20omZYSBcmWhwXbmyDF9nIu50tipufAhTZgoqaRYxZGtCAXqllql1x7jH7Ks+ 8sLi//ZdEUbWf6e0xYGTPHO+n4XJcWD3c/CWfivZ+1Gs+DIopLuiw6TOxjBfF4MiDGMH EgHw== 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=zl0jZ+xN8oBPlizwzJILYwa2cppYjgMBF6GH8rpWbvc=; b=N+QPz9fQx7zFrKSvyoCfs4FIEe1rYIpMqvYOwInAe0uzrbTM/LnbLxO98kvDRWr34C edbQL2gn/gBTo/Fo4rP/Infs1vlFiQNyFY+vNWDGFB4EqvCKGoH4vblEGFdpXU5FrnHj b8LlPyrZNbuq9jqP12kzY72T7e3Fn8YstczB4QxkzREzN24wKRp6Q/1BiokQYmwnLqBi Dz0mYIfMr4G/1Tj3XHgcRf+rrSPyHx7IOJEh00siuRwym4tMIpkPYs1Y7chdJgAMZNlv SBnZGbQ2Nf79Z7HR9O/z0CsRkowbSXCdNy5sFx3dSkewhkCu+daaYNYQNWbyuczgzvBH el8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=TuPGNbfY; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8-20020a170902c40800b00186db024863si2154404plk.612.2022.11.17.13.45.11; Thu, 17 Nov 2022 13:45:24 -0800 (PST) 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=@microchip.com header.s=mchp header.b=TuPGNbfY; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240891AbiKQVbi (ORCPT <rfc822;a1648639935@gmail.com> + 99 others); Thu, 17 Nov 2022 16:31:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240840AbiKQVb3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 Nov 2022 16:31:29 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F7425B5BA; Thu, 17 Nov 2022 13:31:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1668720689; x=1700256689; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yQiMXryQ5CnJworTdlI0xW4U42SpOH1ZlqiWstKe+mg=; b=TuPGNbfYy0AWEKjMikryWcAioUH3DHiC9qolSptwvTDdaUKTMeLObSyi vRGc2RxhCVCabEV1S4Cmd4LV5lcG2SCKHPTexTXSsZZX+1ZarESkb2Y6k 4/XnzVl3IIfC4aiJzHVe+fTat7l1d4UFEGaUxCLYkac6TEHM8YBSq+Wxu zZQ8wzlMvCMG5GwEAfUEHoCmHkotXGHjQDc2j5uqh+t754hpTcL6PH7wW wZbLGXGmdY+kaLDzd0yl8+FMgg2jcdIqX27+giKtxw/h2QxJHS8LAcmQ/ f347ZuTr1TZ0GsC+dpbkL4iGQm5MJJQW4yf6OwKSJiv8NfGWem14eiCRZ Q==; X-IronPort-AV: E=Sophos;i="5.96,172,1665471600"; d="scan'208";a="184068258" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Nov 2022 14:31:28 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 17 Nov 2022 14:31:25 -0700 Received: from den-dk-m31857.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 17 Nov 2022 14:31:22 -0700 From: Steen Hegelund <steen.hegelund@microchip.com> To: "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> CC: Steen Hegelund <steen.hegelund@microchip.com>, <UNGLinuxDriver@microchip.com>, Randy Dunlap <rdunlap@infradead.org>, "Casper Andersson" <casper.casan@gmail.com>, Russell King <rmk+kernel@armlinux.org.uk>, Wan Jiabing <wanjiabing@vivo.com>, "Nathan Huckleberry" <nhuck@google.com>, <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, "Steen Hegelund" <Steen.Hegelund@microchip.com>, Daniel Machon <daniel.machon@microchip.com>, Horatiu Vultur <horatiu.vultur@microchip.com>, Lars Povlsen <lars.povlsen@microchip.com> Subject: [PATCH net-next v2 1/8] net: microchip: sparx5: Ensure L3 protocol has a default value Date: Thu, 17 Nov 2022 22:31:07 +0100 Message-ID: <20221117213114.699375-2-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221117213114.699375-1-steen.hegelund@microchip.com> References: <20221117213114.699375-1-steen.hegelund@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749781341392450809?= X-GMAIL-MSGID: =?utf-8?q?1749781341392450809?= |
Series |
Add support for VCAP debugFS in Sparx5
|
|
Commit Message
Steen Hegelund
Nov. 17, 2022, 9:31 p.m. UTC
This ensures that the l3_proto always have a valid value and that any
dissector parsing errors causes the flower rule to be discarded.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
---
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c index a48baeacc1d2..04fc2f3b1979 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c @@ -648,7 +648,11 @@ static int sparx5_tc_flower_replace(struct net_device *ndev, return PTR_ERR(vrule); vrule->cookie = fco->cookie; - sparx5_tc_use_dissectors(fco, admin, vrule, &l3_proto); + + l3_proto = ETH_P_ALL; + err = sparx5_tc_use_dissectors(fco, admin, vrule, &l3_proto); + if (err) + goto out; err = sparx5_tc_add_rule_counter(admin, vrule); if (err)