Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp209403rwd; Wed, 14 Jun 2023 14:48:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5a3mAOYSVJiRlqpaqUe2T9DabhZPoUoPI4xyJLkPaJBCZN9bLRQ4K8qxYA8XPQB/bWn9sR X-Received: by 2002:a05:6a20:8f1d:b0:102:5e06:1544 with SMTP id b29-20020a056a208f1d00b001025e061544mr3110273pzk.30.1686779302459; Wed, 14 Jun 2023 14:48:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686779302; cv=pass; d=google.com; s=arc-20160816; b=a6xXVd2P28W59Bfw8V/xuMGQO2FZkd+0TGSJh+I7y0E/t0TCpnMqOxrZIqtIfiQkQF J8Ac0Qydu1QD1Y9j/bN3H3rvWCNsVK+4t6HDj6M/wENVfjpAmrGy0qp+oAFGarEWp5o7 ulB+eXMrY/8iDJ8JDW51IPbmTrkP9UldPFFbsb1dV23JPanL0jG3nMYSl/5VmMBkkEha JsLx14Su4EM1h6p/Jy+dvF0KJik5tKkvkA+lEIIQgfg8TZ3TllEjVprNmkvZkzVtJJlc mSmA4YeRDSiKFQZdn8EqqILKU6+i/vgoWozxKHzqiaTvZLvpnf40SmwvNxqLZ6A/JXTH TuOA== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=HL/V6X5FJE49+oavciSGPyT8yk6vbcKidZvKruCwB98=; b=fkk5O+Se8mMRCW0xDZiOOwKXRKm6oGLhmKhZZIO3GvsZcFHFUy7mDPma3xZ0YL+Ala 7+t8y2rgDgaEI9UeJ+ocVRQWCm7ou3qGTkfLdSD9kaShloVZtqHbIpSmz+EMpZeooSJX ler2b1MSlrmdnr3EUyo/tDkfaDgx2s6sz3GVNwKv4tdxKh3cut1JGay/YzFc00ClTpXT UR0Kcw0CguR31EBE4AzXYeyb+z9AzItFhz9VJS3Kjk3WFUtPq+STzkEPlHzxwlUqdlFI 719Kvwn/GrI+AxoC5JAZ1Q/t00cggvVD9K9sQIrwWG9KeQgxohN+rALzLs1J/kbF8apS 5ZHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=EA0y4NaJ; 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 c6-20020a6566c6000000b00543e3449f28si11329040pgw.616.2023.06.14.14.48.08; Wed, 14 Jun 2023 14:48:22 -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=EA0y4NaJ; 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 S232748AbjFNVG0 (ORCPT + 99 others); Wed, 14 Jun 2023 17:06:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230301AbjFNVGZ (ORCPT ); Wed, 14 Jun 2023 17:06:25 -0400 Received: from sender4-op-o10.zoho.com (sender4-op-o10.zoho.com [136.143.188.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FD17211F; Wed, 14 Jun 2023 14:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686776751; cv=none; d=zohomail.com; s=zohoarc; b=N2g2WTxb4Kjk1Nrl8KDVo/5/A8G65KS+OISjUPGXTCK8ILnJ5DcSDCv4fZP46rEaHe5vvaSQ2TRaMTwaD0mh2ESBfs8cfEk2RwzO7V8Js436/Eeoxv0vS5sHYtEhee6Kt1KGB3HhiFniOdJSrx/geuFS+wdcrmK1+XHbtiNL6aI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686776751; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=HL/V6X5FJE49+oavciSGPyT8yk6vbcKidZvKruCwB98=; b=fMuWpNFI++RpUKQ/Y+dSK3J6mww0qb4JpYhjIXZdrO5fxkIdeR9NQm/6/+tZbKljLyFsqKnz8h/9wAqKqNWQrq0ysAISm8ltPg7Oudo9EQGTcPw6DU8LAFVxP341zNyOSJKetgC0Vh/Qoa86SnqZYF9tNqj8LQwNMqqJozcxd/8= 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=1686776751; 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=HL/V6X5FJE49+oavciSGPyT8yk6vbcKidZvKruCwB98=; b=EA0y4NaJwSe1P+xLC5EcWxJPJfJtEA5cjNo3h7rTW3e2PqYSjPqHS0RLDZCOfR4d FiAmimy+9ahEAwwc9IxwvamF+akeGHmRsvBWqjsEdxoc8MjkyhPKB/RR09PtQYzBGUH ULLykRFMl5i9/UhEFHRP4+s3obRRnyS8HLK80BGo= Received: from [192.168.99.141] (178-147-169-233.haap.dm.cosmote.net [178.147.169.233]) by mx.zohomail.com with SMTPS id 1686776750547832.5791071848975; Wed, 14 Jun 2023 14:05:50 -0700 (PDT) Message-ID: Date: Thu, 15 Jun 2023 00:05:44 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH net v4 4/7] net: dsa: mt7530: fix handling of BPDUs on MT7530 switch Content-Language: en-US To: Vladimir Oltean Cc: Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , Frank Wunderlich , Bartel Eerdekens , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20230612075945.16330-1-arinc.unal@arinc9.com> <20230612075945.16330-5-arinc.unal@arinc9.com> <20230614205008.czro45ogsc4c6sb5@skbuf> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <20230614205008.czro45ogsc4c6sb5@skbuf> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Status: No, score=-2.2 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_H5,RCVD_IN_MSPIKE_WL,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 14.06.2023 23:50, Vladimir Oltean wrote: > On Mon, Jun 12, 2023 at 10:59:42AM +0300, arinc9.unal@gmail.com wrote: >> From: Arınç ÜNAL >> >> BPDUs are link-local frames, therefore they must be trapped to the CPU >> port. Currently, the MT7530 switch treats BPDUs as regular multicast >> frames, therefore flooding them to user ports. To fix this, set BPDUs to be >> trapped to the CPU port. >> >> BPDUs received from a user port will be trapped to the numerically smallest >> CPU port which is affine to the DSA conduit interface that is up. >> >> Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") >> Signed-off-by: Arınç ÜNAL >> --- >> drivers/net/dsa/mt7530.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c >> index 2bde2fdb5fba..e4c169843f2e 100644 >> --- a/drivers/net/dsa/mt7530.c >> +++ b/drivers/net/dsa/mt7530.c >> @@ -2259,6 +2259,10 @@ mt7530_setup(struct dsa_switch *ds) >> >> priv->p6_interface = PHY_INTERFACE_MODE_NA; >> >> + /* Trap BPDUs to the CPU port */ >> + mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK, >> + MT753X_BPDU_CPU_ONLY); >> + >> /* Enable and reset MIB counters */ >> mt7530_mib_reset(ds); >> >> -- >> 2.39.2 >> > > Where have you seen the BPC register in the memory map of MT7530 or MT7621? I did not somehow dump the memory map of the switch hardware and confirm the BPC register is there, if that's what you're asking. However, I can confirm the register is there and identical across all MT7530 variants. I have tested the function of the register on the MCM MT7530 on the MT7621 SoC and the standalone MT7530. The register is also described on the document MT7620 Programming Guide v1.0, page 262. Arınç