From patchwork Fri Jan 27 13:08:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steen Hegelund X-Patchwork-Id: 13118694 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 890F5C54EAA for ; Fri, 27 Jan 2023 13:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e+KTKRpp6r7OA9Vxx4WO+rNwX0hE2qtJ5FI8H5NcxHk=; b=iogVMWNuFTEyrs 3g1nwSoNlulFXb5c0GaH3N01w3c9X6ZTRO5J5b7H47YLu359zuk1GYOuxutqp3sxByqqW7TcIWJwp SESOlcOm+Ro2dnoAdf7CS7iWS2mz/Jl6Gtc3rxOa5j67QjFMFw9E3eFVkB5qlE8dE5u5mDuWIogLp A00pXUJhpTjhX/xI6cUenPvNUFbZpPNqiRVRABYlel00eaLpPQEmw5wOujtbCtitnKYQ2PeZHbsbD KjUaD8C5oLxxB+a+1Ix3awS5usT5YJ7/qUoj/FoPosCTc0CPdtWRhWMsSEi6F9RR4wPRa/7Ow6+D6 BCfVAthuHrKPVbnUUx2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLOsx-00F2iX-0U; Fri, 27 Jan 2023 13:35:19 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLOTP-00Esqk-J4 for linux-arm-kernel@lists.infradead.org; Fri, 27 Jan 2023 13:08:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1674824936; x=1706360936; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aOekovlU26BZ6lJ7Al8iWnX4uypFmQKrzcdds3/X4kA=; b=Ja5NOngbAxgG33fhthKN1Ht5T8AIrcNLq4DTy+Y/6uvK4KjMX+FbnibX 3PR1fqVKEZ1oZjGnol8Gppc3mmaZT3LYgTWliWLTDQ+BpQldYDQj6ZuGF SDowBixVXCF1pPWdbPaK97b0TOlMqZrljCfJ5nJxTgMfX5ekHN2Tzcatp Liii8n+2Hd0J3WvF692C5AVnvC5yzq/emzaf/kewVvvcIhSkgRN/JSZMP gM0Hj19T3iw4S3wXcEuuk+m8zGyv+QcmnUBzLyJ/7oOoyNWybzdYi2ViE qnaAJ+JdRmYYv3WC4g5H1p+j3c7GBITyETkVrAULD8kGllm7y66eRrq5c w==; X-IronPort-AV: E=Sophos;i="5.97,251,1669100400"; d="scan'208";a="198504099" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 27 Jan 2023 06:08:53 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 27 Jan 2023 06:08:52 -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.16 via Frontend Transport; Fri, 27 Jan 2023 06:08:47 -0700 From: Steen Hegelund To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni CC: Steen Hegelund , , Randy Dunlap , "Casper Andersson" , Russell King , Wan Jiabing , "Nathan Huckleberry" , , , , "Steen Hegelund" , Daniel Machon , Horatiu Vultur , Lars Povlsen , Dan Carpenter , Michael Walle Subject: [PATCH net-next 2/8] net: microchip: sparx5: Improve the IP frame key match for IPv6 frames Date: Fri, 27 Jan 2023 14:08:24 +0100 Message-ID: <20230127130830.1481526-3-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230127130830.1481526-1-steen.hegelund@microchip.com> References: <20230127130830.1481526-1-steen.hegelund@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230127_050855_677729_D276E4C0 X-CRM114-Status: GOOD ( 10.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This ensures that it will be possible for a VCAP rule to distinguish IPv6 frames from non-IP frames, as the IS0 keyset usually selected for the IPv6 traffic class in (7TUPLE) does not offer a key that specifies IPv6 directly: only non-IPv4. The IP_SNAP key ensures that we select (at least) IP frames. Signed-off-by: Steen Hegelund --- drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c index 59d6ed6f4191..8982c434cf54 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c @@ -266,6 +266,14 @@ sparx5_tc_flower_handler_basic_usage(struct sparx5_tc_flower_parse_usage *st) VCAP_BIT_0); if (err) goto out; + if (st->admin->vtype == VCAP_TYPE_IS0) { + err = vcap_rule_add_key_bit(st->vrule, + VCAP_KF_IP_SNAP_IS, + VCAP_BIT_1); + if (err) + goto out; + } + } }