From patchwork Tue Feb 14 10:40:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steen Hegelund X-Patchwork-Id: 56852 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2893797wrn; Tue, 14 Feb 2023 02:46:29 -0800 (PST) X-Google-Smtp-Source: AK7set+w5hfT71Ey98iNkVRaSbZcSxb6BVcN8ml6j2USgMhY9rHQ0f153nmjEzl8oHPvZzQGkWYg X-Received: by 2002:a05:6a21:78a9:b0:bf:58d1:ce9f with SMTP id bf41-20020a056a2178a900b000bf58d1ce9fmr21005599pzc.30.1676371589647; Tue, 14 Feb 2023 02:46:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676371589; cv=none; d=google.com; s=arc-20160816; b=vQ2cbCqHz5zV9oF7uf5Uewx0clw2aaeHB9AUrD4sb50ZXHaMO6sL13JC17/ZypBDkT Oph/Ntza8FCNPqDpjnJTVKwdqOqwKZg4+UtN4DRpEku6l951/5lLEXyAWNJ6wD5Wp7IZ qQkk9Wk+zjIc2kvg9PAc7TvQR83Rq5vJCCJxgq+Irh151lumJ+yy142zFI84XQNaeePA iQ7k8m9dfVmeI9m+m61EtlHgp61uqIoMSBNGB+KwsEOz0VJu/yw6CFGtICqYpJzUF9NY s+jteqiTcxU4EKqGvd6me15sJGPA/qwF67o9K1pvsv0ZeEjb2E5IE6ldFq2Bsll7KG66 fIxQ== 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=j0TxPtFOg5WBeMNE2Z7Gs/EKJ8w01/LV1P1ofs+8VjXU4Q00gqbE+jR4ZbvEdMSoFK QGGnIxfqxT7wA6RsOWsWpXNB7f4oesjDHjCl29mUGg5Aoa4D7W2Iz36wexMswH/o+3Of 1BdmkV2pTWTyiJTG8ru4B6ZdYieGUhRzpz7jWPTZUrqn431ck7U6t5T992YtQZjR+IBL rJmQYqGAOwTj7jLfHwJibQySwrGbVDx42Zbwhl2mY2Cw2DZvf5U/UBRa1eG40ZPU+JUZ 0AbZiDUyMSOqB5YuBxytYcK8v8UeYsd+Kp2islDron8X7DwByEoQBedHiYO/PQ29aJcH mEJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=OlbOC6pR; 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 u186-20020a6385c3000000b004fb9d7d19b4si6810930pgd.726.2023.02.14.02.46.17; Tue, 14 Feb 2023 02:46:29 -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=OlbOC6pR; 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 S232533AbjBNKmG (ORCPT + 99 others); Tue, 14 Feb 2023 05:42:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232418AbjBNKlg (ORCPT ); Tue, 14 Feb 2023 05:41:36 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13E2525E0A; Tue, 14 Feb 2023 02:41:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1676371272; x=1707907272; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pSgEuxZNu+d4XoNLOzFnDmUYzYsXumWoRDae7nv3+Uk=; b=OlbOC6pRYWRxhM6g8J81pkNj8odI1tInMJ5lb8axiRUKM45l93+aNl7c qJWeDUknyPutZHetIDKxJMoT2j+506JmwNfj4ucewlMqfN3+Z8txigl2V kJoggQ+/nSwrMK8y0OBN4fx1htqr4WLICP8S2IzVTrm7crbRJaLlbBUUX 2ePXt2JPsw7Je5Fjb783v2znUSrFjb7tsVu+KmR+j5Y47TC2aVVz88V+d 6c/SmkjSHkNLx3GE2Q7Y1/3JR0vDkjQwLCd1nYBUdqj0eMNok3H4CLF/o D9FFxvmy2Ow+I5iNJ6CNr/IPbSL9ZttR/21m/kfW+1tekaZ1pUVM6+lr+ w==; X-IronPort-AV: E=Sophos;i="5.97,296,1669100400"; d="scan'208";a="211898298" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Feb 2023 03:41:07 -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; Tue, 14 Feb 2023 03:41:07 -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; Tue, 14 Feb 2023 03:41:03 -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 v2 03/10] net: microchip: sparx5: Egress VLAN TPID configuration follows IFH Date: Tue, 14 Feb 2023 11:40:42 +0100 Message-ID: <20230214104049.1553059-4-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230214104049.1553059-1-steen.hegelund@microchip.com> References: <20230214104049.1553059-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?1757803015873916696?= X-GMAIL-MSGID: =?utf-8?q?1757803015873916696?= 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 */