From patchwork Mon Feb 13 09:24:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steen Hegelund X-Patchwork-Id: 56118 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2250645wrn; Mon, 13 Feb 2023 01:29:58 -0800 (PST) X-Google-Smtp-Source: AK7set8CDGCICYNhYQ0T6eDfqSHmrdimmjqK0SXkw64+TqliXLmpGG+bAgXK67XGjZVDzqS3KKy3 X-Received: by 2002:a17:906:c193:b0:888:456a:cb76 with SMTP id g19-20020a170906c19300b00888456acb76mr24418933ejz.70.1676280598101; Mon, 13 Feb 2023 01:29:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676280598; cv=none; d=google.com; s=arc-20160816; b=ncG68iTppJ+ACaMh2S0EGO04o9+FkPdHw3lPBnTLMjMYS6+IOBXH9OrbPOryGeJ6up oc5NY47IRSHiNwx/eQyiko7ElA8dppvUanAEnujmGBDqd/CN41wB15+PkiLanJX48n3M R8Q1+KYh6a5F76y+rKVZJZbEQJiZ+fKE2eN56i3cAycl6V5F38WGTtlZz7IIK50cEz8J XcXllL7eQdEcsW3po3Guqo4pRn0X8vRW4zeLf+hRHLQdBjMD4NzJWobcjhJeITAJpNpe CHSAeLjSYY3UvngeRI33o3blEUGQanpJvFHanHqKBoy0FTLHP7L5vbafwhFAArB4ZcJG o7Pw== 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=nhYGWWjAPctmlGPakjZifKvH5xgVj3Vh54ANIKjfJig=; b=fTnmeS2Gz5kwCzNrr8tRKXvQ3Bf2czAtYrIn3LiKYZCXvyKiAniUiERxMlBRmIuZIR 7v/HHpYFQOzjdYGGEpRsyFBpIrnDPkryi70e2QWWzpClitVPxnHOgL+kzX7r0tYBjnjk 8sIlUJwugLQzJCpdyD5Xc9KS0LWLHl/TFhT4ZMEbqcgnaD3gjiHjLCCT2kaAB/bDq/pq r50SRCgaSJ2BYd0jM0KOH5uml9f2nQ4Pkk6TnuVvxW88gvBg4Qqr/OPfOnblvtrXKUDo eUZJLYRQZS590MWpklU68xx9RkukMn+8H4I5uu3JMOMoAHPV9mTctLvS1ISlyo9znpHq ZdZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=i2+zMuAz; 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 10-20020a170906224a00b0087189500087si15790773ejr.47.2023.02.13.01.29.34; Mon, 13 Feb 2023 01:29:58 -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=i2+zMuAz; 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 S230160AbjBMJZg (ORCPT + 99 others); Mon, 13 Feb 2023 04:25:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbjBMJZF (ORCPT ); Mon, 13 Feb 2023 04:25:05 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1108615557; Mon, 13 Feb 2023 01:25:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1676280303; x=1707816303; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pSgEuxZNu+d4XoNLOzFnDmUYzYsXumWoRDae7nv3+Uk=; b=i2+zMuAzlshgwwtSnNjdH7t60BvTXWkAg/QM1zkpq4KeiN0S4UizUZBZ xeeOjiw6KferM6E2mtor27LgpNvxIF8QhPgJ0DQ8+m3Cpab68kZtK7f3F z+r2QPrbllkqkXwhlQ1dCkfjGj7OLHZljbsXxk6quE5Ts1pdPEZSrGmxl sdBhwqJ+SdNkuN2iTr9tHY9ZwVC1H61ukt+EApHFAhiSKxRzmX9Ad7CLV PHQXlJ47dBRXLSOJ0ic9iT44Ruc65c5TxZz3lwsdHqDz7uY1vhEsgZ91w FckB60as0WAxV4Z1J/r0xua+8+Er435Z8tlP7ciYrnrhT6XKpSqKiis88 A==; X-IronPort-AV: E=Sophos;i="5.97,293,1669100400"; d="scan'208";a="196611576" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Feb 2023 02:24:49 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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; Mon, 13 Feb 2023 02:24:47 -0700 Received: from den-dk-m31857.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Mon, 13 Feb 2023 02:24:43 -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 03/10] net: microchip: sparx5: Egress VLAN TPID configuration follows IFH Date: Mon, 13 Feb 2023 10:24:19 +0100 Message-ID: <20230213092426.1331379-4-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213092426.1331379-1-steen.hegelund@microchip.com> References: <20230213092426.1331379-1-steen.hegelund@microchip.com> MIME-Version: 1.0 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, RCVD_IN_MSPIKE_H2,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757707604656816467?= X-GMAIL-MSGID: =?utf-8?q?1757707604656816467?= This changes the TPID of the egress frames to use the TPID stored in the IFH (internal frame header), which ensures that this is the TPID classified for the frame at ingress. Signed-off-by: Steen Hegelund --- drivers/net/ethernet/microchip/sparx5/sparx5_vlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_vlan.c b/drivers/net/ethernet/microchip/sparx5/sparx5_vlan.c index 34f954bbf815..ac001ae59a38 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_vlan.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_vlan.c @@ -219,8 +219,8 @@ void sparx5_vlan_port_apply(struct sparx5 *sparx5, spx5_wr(val, sparx5, ANA_CL_VLAN_FILTER_CTRL(port->portno, 0)); - /* Egress configuration (REW_TAG_CFG): VLAN tag type to 8021Q */ - val = REW_TAG_CTRL_TAG_TPID_CFG_SET(0); + /* Egress configuration (REW_TAG_CFG): VLAN tag selected via IFH */ + val = REW_TAG_CTRL_TAG_TPID_CFG_SET(5); if (port->vlan_aware) { if (port->vid) /* Tag all frames except when VID == DEFAULT_VLAN */