Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5144634rwe; Tue, 18 Apr 2023 02:42:57 -0700 (PDT) X-Google-Smtp-Source: AKy350azZ6VPdU6I6bPQ9XQFDUrdVOe3Itri380NFGYawLxvQsBcBCkvQ4WScxt+1ZpWheOYRVja X-Received: by 2002:a05:6a00:1954:b0:63d:38aa:5617 with SMTP id s20-20020a056a00195400b0063d38aa5617mr2245247pfk.6.1681810977205; Tue, 18 Apr 2023 02:42:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681810977; cv=pass; d=google.com; s=arc-20160816; b=deF73wP9qN4SEEmY+Un/QraOO+AGYS/69iQ8xTUhxEvreKN/nEv5inSwJz+vmzjt/M vBx1X2EgGbOWTJ8ZVZBVYewVUfCYq8h4+VVM87pN6jiW+NZt7Yp+z3a4qVEoUbpHjsY3 Qg+iC49I5qnZx/UNVvsE4nOnlIhP0pySJhe2HSC/V8/esJS8JTFeLAzhNr3ExJKf8Ac4 QUBydQN+ExoJr82Ilsu3N5o50o/dZiGeRa6OS4Y0S6x71CY/RL4IbdPTNVdDYqBJs8bS A0cW1O0Ki8Clntdvzz81bvTr91jNm6cwXNlfF9cY9h+Q6CfEOiIV7xk4y+jCI5dsnmHo uQ1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=iDqp1SgzROa/7M8TqdAaMU2o1J0hj8rCWz0qyNlos7g=; b=0j0PPiQyj0nOt5JOhgDn0kEsFTHZ20hxT6hVVoKquu2HkCrLRAhBZ7spZU9eEgsWal czHNPMOIzv91Van845iK+HwdOKOhpKhyO7UH9ZfIfShU5251kOVPio+DYNVdJBE5DDqt zRj58wRAtABiTobuDX83G+ADyD+giW/V2FFwFXP4o3h2l0Iye4LbewcOh6CXL9i0JKSa QSJI1LUWCiG9EhiZyE6XuGvOskT9169LntZDCvHtutQjdki/AAc9u6Kgczs1+tXAtodm QwJPm1wXuUK0WyHT+77hacFzuzZn1tJgrGM6bEmjze/VlkhT5gAxGit+3kP+HeJd1T4E UgnQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=L2sWvgxV; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com>); 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x25-20020aa78f19000000b0063d2e0cf589si2689941pfr.13.2023.04.18.02.42.43; Tue, 18 Apr 2023 02:42:57 -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=@arinc9.com header.s=zmail header.b=L2sWvgxV; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com>); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231347AbjDRJ3B (ORCPT + 99 others); Tue, 18 Apr 2023 05:29:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231316AbjDRJ24 (ORCPT ); Tue, 18 Apr 2023 05:28:56 -0400 Received: from sender3-op-o17.zoho.com (sender3-op-o17.zoho.com [136.143.184.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3BB56591; Tue, 18 Apr 2023 02:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681810087; cv=none; d=zohomail.com; s=zohoarc; b=lLvySzOabgFP/7Ao7CJlTBRyDWY6A1ilWyhW0ndfEuusPbEDT/0r6cNX0iW6rkVXOG6NWtr+YcioR5CAKESG8PQV1kHmvhgSM4b/qsI74Nid/Aor+bLFdq0n7IQZHqOB6nIIUPVzDQlXI8o6yrqhZ2YliJeGvY17RiBgcZSvpcY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681810087; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=iDqp1SgzROa/7M8TqdAaMU2o1J0hj8rCWz0qyNlos7g=; b=TVBBWawTRu16UVXrfJRP+h+QvQU2AGOKSh7y3WQFpUwKF6uiKUW6EnKXM529ta0kbCwCRLGfS+kMeljHzOVNzuThnMP5+7mt5NV2apcWaHw5q6uZhUFPTLcqGnu2fXVdnk2nYvSmIQBy9XYI1HJQAR3pAx1lxhdutoO80dw8Vho= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=arinc9.com; spf=pass smtp.mailfrom=arinc.unal@arinc9.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1681810087; s=zmail; d=arinc9.com; i=arinc.unal@arinc9.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=iDqp1SgzROa/7M8TqdAaMU2o1J0hj8rCWz0qyNlos7g=; b=L2sWvgxViPh4NyfAkwuFIx7NalD2FR/IBDd8b8LCwpo/A7XWgzOQ5aHw3UCh6UVg 89+HHmOSBXo0t3J7QsjLaGCrYPl2Ryhz7RRyqZIAoJCx61K78v4loU0AVXRktEtOH53 C5+7pH7qQd1tNuFS1pj5axwiG+3i8SY7ZoGo3QqM= Received: from [10.10.10.3] (149.91.1.15 [149.91.1.15]) by mx.zohomail.com with SMTPS id 168181008614670.97003674812629; Tue, 18 Apr 2023 02:28:06 -0700 (PDT) Message-ID: Date: Tue, 18 Apr 2023 12:27:59 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [RFC/RFT v1] net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging To: Frank Wunderlich , Felix Fietkau , Vladimir Oltean , Daniel Golle Cc: John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Frank Wunderlich References: <20230416091038.54479-1-linux@fw-web.de> Content-Language: en-US From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <20230416091038.54479-1-linux@fw-web.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 On 16.04.2023 12:10, Frank Wunderlich wrote: > From: Felix Fietkau > > Through testing I found out that hardware vlan rx offload support seems to > have some hardware issues. At least when using multiple MACs and when receiving > tagged packets on the secondary MAC, the hardware can sometimes start to emit > wrong tags on the first MAC as well. > > In order to avoid such issues, drop the feature configuration and use the > offload feature only for DSA hardware untagging on MT7621/MT7622 devices which > only use one MAC. I would change this part to: In order to avoid such issues, drop the feature configuration and use the offload feature only for DSA hardware untagging on MT7621/MT7622 devices where this feature works properly. I tried this on linux-next with my defconfig and devicetree [0], on a MikroTik RouterBOARD 760iGS. I tried both VLAN configurations possible, VLAN subinterface of the eth1 interface, and bridge VLAN filtering on a bridge with eth1 joined. In both cases, both sides receive VLAN tagged frames whether this patch is applied or not. My computer is plugged to the RJ45 SFP module which is connected to the Qualcomm Atheros AR8031/AR8033 PHY which is connected to MT7621's gmac1. My computer: sudo ip l add link enp9s0 name enp9s0.10 type vlan id 10 sudo ip a add 192.168.3.2/24 dev enp9s0.10 sudo ip l set up enp9s0 MT7621 VLAN subinterface test: ip l add l eth1 name eth1.10 type vlan id 10 ip a add 192.168.3.1/24 dev eth1.10 ip l set up eth1 ip l set up eth1.10 ping 192.168.3.2 MT7621 bridge VLAN filtering test: ip l del eth1.10 ip l add br0 type bridge vlan_filtering 1 ip l set eth1 master br0 bridge v add vid 10 dev eth1 bridge v add vid 10 dev br0 self ip l add l br0 name br0.10 type vlan id 10 ip a add 192.168.3.1/24 dev br0.10 ip l set up br0 ip l set up br0.10 ping 192.168.3.2 In conclusion, it's not that VLAN RX offloading is being kept enabled for MT7621 because it uses only one MAC. It's because it just works. I am assuming this is the same case for MT7622. With that: Tested-by: Arınç ÜNAL [0] https://github.com/arinc9/linux/commits/test-on-linuxnext Arınç