Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp224695rwd; Wed, 14 Jun 2023 15:04:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4x3FwZX7MB+XQ12piT1H3+1uUCU54gxqD157NhamdP5qXhr9aKCNMTb3seUMUNhtDy+1iq X-Received: by 2002:a17:902:e804:b0:1af:d725:a187 with SMTP id u4-20020a170902e80400b001afd725a187mr15690392plg.23.1686780256697; Wed, 14 Jun 2023 15:04:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686780256; cv=pass; d=google.com; s=arc-20160816; b=KuBm5JFjKQ/XYBleVPeP0xn4LZT9jwIYGa28/1ihZXuI6dcEnwnLHQFW2fFugM8a2H 9ZFq4nCBvHt0AJXSS+Aps4zGKzYOuaGGoGpg2KapxqR0AzrRRy8RywsmqQXCnHgEfRJa ye0MTDWY5WvrLNmluB7YMGZ/qcZ3lJxrpn0lMmYzrWvLCHt5EFF3Z8/LoKLOwlt/JztT I31ZBf3rG0PeB03MGIP47591MTGXuA7zH3Ak7uYC2Vp74dCTMv7CCj7vDguDBj10Ale4 BZYsSp3dkJ5EM+X8nZ5TFyJsChWzDp9rITCRzK85IU5Re4qOdNtSvVfw5oN/MP62FJOu Tg9w== 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=ElJHcwOE2MD9MomG0N24epuSaWGnZJlvFOibVGSk+nA=; b=T3L82emHX3/5LJ4NOSB+pT7KU2R6bbDXeIdSf8wfffuygQsQPiF6a8nVi93Lsl2fIN cVJt84UBS4JemrYCdIeShbN9/qZQDpDY2A54fMHSz5e1gAYBFldnwNDpXd+xxmoigaDj trkIqhFHGpBXw0f1Pozc8q3ujPVNteBVstOhlu1KNsU4JutlzeagcRm+QzdhCUry0P3K ipoF/+REiGrgx8sAiPnbuB3/KxpqM4NpqRsGzhi1jO/0fLhE1rznuyl1Hcz3CSxoSwWj 6c4Sa6ziwZCG7rR11g50wEk6SFwt7zF1VCXLGEIr9PDEYYeOIQMGPtaFYiON57OWda4G 2F/A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=ShtRgEEl; 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 m9-20020a170902db0900b001b3d2717f7bsi6242267plx.61.2023.06.14.15.04.02; Wed, 14 Jun 2023 15:04:16 -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=ShtRgEEl; 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 S235419AbjFNU5c (ORCPT + 99 others); Wed, 14 Jun 2023 16:57:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230042AbjFNU5b (ORCPT ); Wed, 14 Jun 2023 16:57:31 -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 9637E19B5; Wed, 14 Jun 2023 13:57:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686776211; cv=none; d=zohomail.com; s=zohoarc; b=aFappWL7SsPfif8zE0D8Tfmhy4NUMvXsuamJWPTdw2rM4GmUKGoQqI5Guw9NdZHa2p2UDWih9mbJx37mXwxEOa7IAJyYz6SStmnO9PwPITPtqo0dG1TnZK3qZfLf0an0wGPe2zI7Y4gEN0YL3RtvkI0nCE8mhCZa9Tn7G0VJUBI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686776211; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=ElJHcwOE2MD9MomG0N24epuSaWGnZJlvFOibVGSk+nA=; b=c0hShkqBouNuIVvFnIxBqAfcPho0VvFLeLnC6A7biB3yz7ZMta8+IPRMKQWJWvk5GpRZ8KGNkN/hKm73gwFMQrA3XTUGEZ27fnkM+IIj7jR+Kew0kYRdI0yzkn0tNtDXeD069t6GUaGWgaHIm0nwZHlgMXmbeh/lj80uRn1967A= 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=1686776211; 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=ElJHcwOE2MD9MomG0N24epuSaWGnZJlvFOibVGSk+nA=; b=ShtRgEElMlF/a608D506cpQfhGjn2MqBsOZwcue1eAY2vadQ6gtCSrTh4mNIGI3m iB/tQYtOAH10+JjYcHROpjXLSklOKRjAAdTHJKO8SbjmkPqYHRSzWCm1i0tPAcstm21 LjrERJaVFow+5miCJa4c4BbOUJIlEDOwJfF42X3c= 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 168677621095320.21150552014285; Wed, 14 Jun 2023 13:56:50 -0700 (PDT) Message-ID: <1e737fe9-6a2e-225b-9c0f-9a069e8fd4bc@arinc9.com> Date: Wed, 14 Jun 2023 23:56: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 1/7] net: dsa: mt7530: fix trapping frames with multiple CPU ports on MT7531 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-1-arinc.unal@arinc9.com> <20230612075945.16330-2-arinc.unal@arinc9.com> <20230612075945.16330-2-arinc.unal@arinc9.com> <20230614194330.qhhoxai7namrgczq@skbuf> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <20230614194330.qhhoxai7namrgczq@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 22:43, Vladimir Oltean wrote: > On Mon, Jun 12, 2023 at 10:59:39AM +0300, arinc9.unal@gmail.com wrote: >> From: Arınç ÜNAL >> >> 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 >> received from a user port to the CPU port that is affine to the user port >> from which the frames are received. >> >> Currently, only the bit that corresponds to the first found CPU port is set >> on the bitmap. When multiple CPU ports are being used, the trapped frames >> from the user ports not affine to the first CPU port will be dropped as the >> other CPU port is not set on the bitmap. The switch on the MT7988 SoC is >> not affected as there's only one port to be used as a CPU port. >> >> To fix this, introduce the MT7531_CPU_PMAP macro to individually set the >> bits of the CPU port bitmap. Set the CPU port bitmap for MT7531 and the >> switch on the MT7988 SoC on mt753x_cpu_port_enable() which runs on a loop >> for each CPU port. >> >> Add a comment to explain frame trapping for these switches. >> >> According to the document MT7531 Reference Manual for Development Board >> v1.0, the MT7531_CPU_PMAP bits are unset after reset so no need to clear it >> beforehand. Since there's currently no public document for the switch on >> the MT7988 SoC, I assume this is also the case for this switch. >> >> Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch") >> Signed-off-by: Arınç ÜNAL >> --- > > Would you agree that this is just preparatory work for change "net: dsa: > introduce preferred_default_local_cpu_port and use on MT7530" and not a > fix to an existing problem in the code base? Makes sense. Pre-preferred_default_local_cpu_port patch, there isn't a case where there's a user port affine to a CPU port that is not enabled on the CPU port bitmap. So yeah, this is just preparatory work for "net: dsa: introduce preferred_default_local_cpu_port and use on MT7530". So how do I change the patch to reflect this? Arınç