Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp183843rwd; Wed, 14 Jun 2023 14:18:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4S2KtvOb5M8MfGSJrMYIP+jEvIiLYHkU70yFUoS/xKNjFpXpRNYu35UEYgERw68/PtBLry X-Received: by 2002:a17:907:c0d:b0:97e:7ad9:e78 with SMTP id ga13-20020a1709070c0d00b0097e7ad90e78mr11809230ejc.77.1686777504915; Wed, 14 Jun 2023 14:18:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686777504; cv=none; d=google.com; s=arc-20160816; b=w2ctDK+SCAdNFJsMFKXDmxAZBexK1eLksXmAUoFXjmmYueIRl5/j+mr58TZVjSpv4s Ygxx+JCemuc6xtqDSbOnWhILZCPx+JGYcuTftRmDtawNPe8dOZ/jTd2dhL2q5rfH636J X9K6FV1fzDWGF/FUquyWvTPMFvvs3JjQbPCxrmnm65ir9hF5jAy8gg1p3JYHUy5GnhKe fcOFXbYwUlhyzgHLDbG5ClK6CzpEGKoLl5bZd0xnA8wyRZy5dKQj5vbJ+Jey+XySK6zL ty7FDet8KWrUEEFL5ouuN167e6Dy4wwmZ7lr4EIR6p6CwRAiodQ6V+veOljVrMZdby2G P5EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8/8NwNNJTBuf6M4bs1oGKo/XENM1375c2z+Z+9Ow5uA=; b=GlsYcBAR1ZjIfpFWaoM1g2/n9pKWtvnw+7oiHSuQeYV7Jmwglq9ZQPYz5RywoqVyK6 sQd1bQoJZPb9vSSJiWrRI7500jLZcqyTkeeKoKFB3+pYyih4RFlp7s4MHPBh3x4+QixC A/bc3O41Yc+JL8yTDpfFANQgLeJAwnaTcfAkM+OBk8zDMZOSIZw713VNREVDC5HVAp0b iu1dm5QCtTz37stZL7j/u/EIRaGZVKZ/ssmwKnLuoTZy2RSDUbaK3+S6kUz1vLWpHj2e dONId0pWrO1CmKA2GzUY0/g+YvRepkLRmfWCJ490TCgYl9BMpq1t4NfLDl5qkTnLACnm C9Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=iQu8hw9S; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pv9-20020a170907208900b00965a5941cbcsi4713033ejb.982.2023.06.14.14.17.53; Wed, 14 Jun 2023 14:18:24 -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=@gmail.com header.s=20221208 header.b=iQu8hw9S; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235929AbjFNUuT (ORCPT + 99 others); Wed, 14 Jun 2023 16:50:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234351AbjFNUuR (ORCPT ); Wed, 14 Jun 2023 16:50:17 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDB3E2688; Wed, 14 Jun 2023 13:50:13 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-51640b9ed95so12051790a12.2; Wed, 14 Jun 2023 13:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686775812; x=1689367812; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=8/8NwNNJTBuf6M4bs1oGKo/XENM1375c2z+Z+9Ow5uA=; b=iQu8hw9S5dWONmBpsohjbVjkLwCAZd/KFdBFuMSrg0cvTDPHJaPBKcvo+NtMBeobr6 dGpYVZ1LEurVX3LK0fGBAc9SBD1nNHmk3muc6BrB/sb+Ak1BgPYefkMMK8sZdbDtK92L QvmnaXghboqMqUvHc1/UGWXflQEoUSsKmRlear4E0vSFZtoNXAusC6HJk/FMP6g/+tE0 y8sXwbGUU2VGPubGn8moPwf3nuepbiehJE1G6r1CJ27M5JhyKlqqmFZ7KQs9vh7LkCUA 52NPEWqMRw0PR6cAOpAltEFQXnafM8pcTOHlyO7F3ixwmF9nd4ZVAaSkdCG4DmkStC46 MwAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686775812; x=1689367812; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8/8NwNNJTBuf6M4bs1oGKo/XENM1375c2z+Z+9Ow5uA=; b=LR4oiJ/ieg9p3P7Ey2yBsmRV9tP0GsxqIq8eJv1uJESD7MwdkeAq7XLp3I59BvEZsz 4rgGQW6BnBSAApDQFt7qylFtxljehogSul9CCYrX7IKgEOtdUG/479yqugpFN2zZqbdg d6gfHsTK3/Bua23HKGUeEA5mkJMBVwXc48M5X0pgDBNtGONxaJnW7+oy25f8FCsxOlt6 AZqy9lkznN588ursC+h1/Ay2QgKNX8QRrMxP5RZwEmY6MSFeIc8u5xKnQSCKrtoD9gN0 eCdEzQo6TzzoFuM5ce8W+ZDHc0dfC3kdc/QsDlOz7LifHMCX+m+FkE2k0r7AgpJ0k56b KY7w== X-Gm-Message-State: AC+VfDxx3fKhHm400maVgQIJ35ffUPO/6RPKHGmE5O6jHBlswfP85OHy rU4tYsUEddmvsX113Qvnyxc= X-Received: by 2002:aa7:c74d:0:b0:514:9d2f:10be with SMTP id c13-20020aa7c74d000000b005149d2f10bemr10049447eds.18.1686775812049; Wed, 14 Jun 2023 13:50:12 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id p9-20020aa7cc89000000b005166663b8dcsm8058311edt.16.2023.06.14.13.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 13:50:11 -0700 (PDT) Date: Wed, 14 Jun 2023 23:50:08 +0300 From: Vladimir Oltean To: arinc9.unal@gmail.com Cc: =?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 , 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 Subject: Re: [PATCH net v4 4/7] net: dsa: mt7530: fix handling of BPDUs on MT7530 switch Message-ID: <20230614205008.czro45ogsc4c6sb5@skbuf> References: <20230612075945.16330-1-arinc.unal@arinc9.com> <20230612075945.16330-5-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230612075945.16330-5-arinc.unal@arinc9.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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?