Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4550982rwd; Sun, 11 Jun 2023 09:38:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7zB51QvtCPU5S6NUpznlvjXNZdrJ5Hk3Vng10ncuKt5XI0xGEEX6HD/BULBZNu23Mja06J X-Received: by 2002:a05:6a20:38b:b0:110:9b0b:71a5 with SMTP id 11-20020a056a20038b00b001109b0b71a5mr7082353pzt.23.1686501526225; Sun, 11 Jun 2023 09:38:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686501526; cv=none; d=google.com; s=arc-20160816; b=nI7H4Qln4hm9IKy9ktvJStu0lLtoFZ43gbsikBu3LhXgt8MXC156/AfLWHKuj0w47+ 3RH2Zd3yHTuehC1aZET6Xw0F59QWUCDd+/gpbYn6q0i5Mrx/9oCaF2j6sDD3Inspd2it LZfF+ao2cU7NbJ8oDn+tkoj0IPJkWHvblPWCHkMql4wu1lFpNQh1fpkM4TaecNKqhszl rYl2VK86EeM4+p9M85w6/Acn5u4khdpOm5G4A9YHpB/NC5vzDndm0G8dcbl2sAbUCw8s cfiXGC9oP0gx2+LTjiqrmmP0tq0TtWt9H7tTUNTFOFlktO/wBER/ztUVjXRT7P/lxAEJ YraQ== 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=T6CrEyCJEWEjaLFn6LFzF3ByBBDxPmYhcwwQOFSbgLs=; b=eX71bRopt1RJ63xwQ9M04mv+GcCvsM10ClvSr00b22NCMjcuIvZgzzP+jE5rBqpPPn ISQ+5wV+mvx5Vk0hegBhcQFannLI47Q/qOzDipKIBI5EQkXD4L4FuaWmvto5+f3KD1tz 89Wb8odXKMyeIJjf0eOJ90bHz44LYCBznCWWo9rq3fKezS1p1q1Jzba2C1xTPdYe7QMM 0RLbLjr/ThKkbYZFYPDzB7V77XooeTtP+ShCD6wLxH70e40S0izEQ36rLZMLgaXjSGli VFk9RTRK1KMNXKgnzjCYq4i7/i54Oa4rt4SbzeaAsfNXh71AwnDw5JBTPVycHzV+QXHw PbTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="GY/NWPB/"; 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 k189-20020a636fc6000000b00543cba6043asi5740962pgc.151.2023.06.11.09.38.31; Sun, 11 Jun 2023 09:38:46 -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="GY/NWPB/"; 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 S231146AbjFKQEc (ORCPT + 99 others); Sun, 11 Jun 2023 12:04:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjFKQEb (ORCPT ); Sun, 11 Jun 2023 12:04:31 -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 E0CDFC7; Sun, 11 Jun 2023 09:04:29 -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=T6CrEyCJEWEjaLFn6LFzF3ByBBDxPmYhcwwQOFSbgLs=; b=GY/NWPB/N6B5liOYRNI2P2Y76+ GgHVnWtiBdoG67PbMdOZXrBSDTjUbRFsOirk1Oznc02Ebd8Mw+MorznSATUPfTHFejWrRUhyPj9zQ 0KliyI1gbF6vKWCY9dSipfeXRn26SCw3k8sWHWTuLgthTvKoBOZhY2ry9gWj3xrqBFrhMWVOCb6sw Wl167FTeCT07Y29qeg+MnhnNvw6tsEH43pLsn2Mewa81VhKTaacsuE1BOJRk7yOM61QIdH9+iqZ21 mp3gkLcf17sqyDPZiHb6sGl8KJY79RGzRIBlLJJs4gwi7DkzH5JUIZU8U7YV7+ftCo59PadEPuOCr +hjxnE6A==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:60546) 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 1q8NY4-0004Yn-CJ; Sun, 11 Jun 2023 17:04:12 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1q8NXv-00043w-8q; Sun, 11 Jun 2023 17:04:03 +0100 Date: Sun, 11 Jun 2023 17:04:03 +0100 From: "Russell King (Oracle)" To: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= Cc: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "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 v2 1/7] net: dsa: mt7530: fix trapping frames with multiple CPU ports on MT7531 Message-ID: References: <20230611081547.26747-1-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: <20230611081547.26747-1-arinc.unal@arinc9.com> 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 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 Sun, Jun 11, 2023 at 11:15:41AM +0300, Arınç ÜNAL wrote: > Every bit of the CPU port bitmap for MT7531 and the switch on the MT7988 > SoC represents a CPU port to trap frames to. These switches trap frames to > the CPU port the user port, which the frames are received from, is affine > to. I think you need to reword that, because at least I went "err what" - especially the second sentence! > Currently, only the bit that corresponds to the first found CPU port is set > on the bitmap. Ok. > When multiple CPU ports are being used, frames from the user > ports affine to the other CPU port which are set to be trapped will be > dropped as the affine CPU port is not set on the bitmap. Hmm. I think this is trying to say: "When multiple CPU ports are being used, trapped frames from user ports not affine to the first CPU port will be dropped we do not set these ports as being affine to the second CPU port." > Only the MT7531 > switch is affected as there's only one port to be used as a CPU port on the > switch on the MT7988 SoC. Erm, hang on. The previous bit indicated there was a problem when there are multiple CPU ports, but here you're saying that only one switch is affected - and that switch has only one CPU port. This at the very least raises eyebrows, because it's just contradicted the first part explaining when there's a problem. > diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c > index 9bc54e1348cb..8ab4718abb06 100644 > --- a/drivers/net/dsa/mt7530.c > +++ b/drivers/net/dsa/mt7530.c > @@ -1010,6 +1010,14 @@ mt753x_cpu_port_enable(struct dsa_switch *ds, int port) > if (priv->id == ID_MT7621) > mt7530_rmw(priv, MT7530_MFC, CPU_MASK, CPU_EN | CPU_PORT(port)); > > + /* Add the CPU port to the CPU port bitmap for MT7531 and the switch on > + * the MT7988 SoC. Any frames set for trapping to CPU port will be > + * trapped to the CPU port the user port, which the frames are received > + * from, is affine to. Please reword the second sentence. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!