Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2466581rwd; Fri, 16 Jun 2023 04:12:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7z1GP69HJ3/DHM5YIT/ov5AEEFti8pkg3nPTvdZav4QOGxBMqPVnG7Az6w/e76PxaJDAKN X-Received: by 2002:a05:6808:a95:b0:39e:a612:3b7f with SMTP id q21-20020a0568080a9500b0039ea6123b7fmr778625oij.28.1686913970004; Fri, 16 Jun 2023 04:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686913969; cv=none; d=google.com; s=arc-20160816; b=g+EvM37KJOYATaZ1LJGlLBjsOs/dyxqTZvzkMjGbWIZWFn5qD2n+QvZxwGmeZDwmv6 Q8exu7iLTrzdJkTEQqbuIJS2wU6DZjnZPAXmKzWZL/8TqMvkDLSLkgZoSuW12vNDjuOH cmOzPeaz5j3o8oixj343ZTsfyOQrZRddIeBQZ2XviX/pT6V5q2UcSG5+0RaKfidx8Fct HEh9Tu6qwF0XjpNv1djcD+AZB5KsjIRG4nXgdm3RKlgGwa1pk/OWpUL7WtAACuwUn/9R X1wSwV8UEA73s+k/KMD6fd7Zdy8OcJf2ofFWnqX6Jt2qdg4IEuKo9pXWvvDOnwD8HetS QiGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sK1OkILI3tCCKrHsANJ/lF6HcUCMTaIXmnshn6ttAEk=; b=tQgATJnnZbuxjA+1KUk7hN7HJM1rJGXXYY3USuaLJlHMLEe/eGeS5qYYyns34fizxK NT2fk5shPLl8pfte7uzXpyEiyi3X13lwfALZq7SiRBJyEuWtLAeftCb76CQ5PSngzQw7 uQLBEpw66GrP8FnozfDCHTiPvosf+WQYQxFQvq3KXFANGcrT4Gg46RVVYofqcYJY1BUK 2CreuSrnTbMgOmEcQYvIOlxsjKN6V3eX3QtMJUXLGpm8FH6ry/JV1RkFPqkjxo/5sTrH JOXXS5xqY4yDYAdQI962gfRomRYuVtAQdoTSotpykkdJfuV5Ym52v1k4a68UXgdVfUMM Gx5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="lyBGCl/4"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z16-20020a63b910000000b00542b1792242si11336951pge.720.2023.06.16.04.12.36; Fri, 16 Jun 2023 04:12:49 -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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="lyBGCl/4"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242108AbjFPKVD (ORCPT + 99 others); Fri, 16 Jun 2023 06:21:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232377AbjFPKUK (ORCPT ); Fri, 16 Jun 2023 06:20:10 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F047AC; Fri, 16 Jun 2023 03:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sK1OkILI3tCCKrHsANJ/lF6HcUCMTaIXmnshn6ttAEk=; b=lyBGCl/4UEreZscOrhXlDdFEY4 8/SdOD5RAX1cvJtX4AUwvr6vRfY4GQ9uQpyTdDVJDXg3tnQfumKhfUUU6x+mkJ3aTBCBzvQUmaE2T v+rsBLj++yRFKRbhNvB4++SLl+/O8uvxvbBqOHH+vo/A4u4148LxHnd5EvPMik6IMxy1pHOAk2QG0 OxMZrQ2IXmCRx3k2QsO/FjYT3itl3JMOpPnqOenIQamEqLlWL9xgwcnog9t+gMovtoNzQEYoS1ppV mfM2ieIDwipcSKqGgGsvYft6Y/C8QyJZXEhynQR/ZxEshY8qY+hDCrEXTYpBj0HUV3zNfJ+C7lkmU 9ED59txA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:45520) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qA6Y3-0004mw-QS; Fri, 16 Jun 2023 11:19:19 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qA6Y2-0002QX-ND; Fri, 16 Jun 2023 11:19:18 +0100 Date: Fri, 16 Jun 2023 11:19:18 +0100 From: "Russell King (Oracle)" To: Vladimir Oltean Cc: arinc9.unal@gmail.com, =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , 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 , 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 Subject: Re: [PATCH net v5 3/6] net: dsa: mt7530: fix handling of BPDUs on MT7530 switch Message-ID: References: <20230616025327.12652-1-arinc.unal@arinc9.com> <20230616025327.12652-1-arinc.unal@arinc9.com> <20230616025327.12652-4-arinc.unal@arinc9.com> <20230616025327.12652-4-arinc.unal@arinc9.com> <20230616101108.wq5aote3yjpekilu@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230616101108.wq5aote3yjpekilu@skbuf> Sender: Russell King (Oracle) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 Fri, Jun 16, 2023 at 01:11:08PM +0300, Vladimir Oltean wrote: > On Fri, Jun 16, 2023 at 05:53:24AM +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. > > > > 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 e9fbe7ae6c2c..7b72cf3a0e30 100644 > > --- a/drivers/net/dsa/mt7530.c > > +++ b/drivers/net/dsa/mt7530.c > > @@ -2262,6 +2262,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 > > > > Ok, so this issue dates back to v4.12, but the patch won't apply that > far due to the difference in patch context. > > Since the definition itself of the MT753X_BPC register was added as part > of commit c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 > switch") - dated v5.10 - then this patch cannot be practically be > backported beyond that. > > So I see no possible objection to the request I'm about to make, which is: > please group this and the identical logic from mt7531_setup() into a > common function and call that. I agree. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!