From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ECBE4EB64D7 for ; Tue, 13 Jun 2023 18:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To: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-Owner; bh=BoSscebaUZCo8W7AqYB1MNUZWTbe4KvCL30aAhOJuJ8=; b=WVZ8dv5XyNcNYE kKPovi9xBEePJFfu4sIh9avxAhW3Iahbgj0/0l2ZIDTaPxMy/qsivvyV/+k/HeEnR33FPRVbiqytc n3yEbmajUQ6ggUVk0LBXd/Tf6EnwXK7ADreOvPoD32vwiZ8CtbyRE739V7CK54WXnNir2008EqRbV e21/E3uaPa9eY0iOMESz3L7LSk1Malg39o5O8NvpnH5hdQFBbdPDOw0JLrTaPwcLgiGJ79Zk8h51f xxucIHSFAQzuWdsTROjNuPULt3BEBQHw5iXAWaZ5kXTWw+VdFM7FMP9vQ67DdMrvTWt/OVStHRQwJ pvAlvNZ+Qwn0LR+8Sq2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q98m1-008qpA-06; Tue, 13 Jun 2023 18:29:45 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q98lw-008qoR-0e; Tue, 13 Jun 2023 18:29:43 +0000 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=DXfkpTd4BgNrWMUgFq3EjpQXH5nUJQkyJKKnkCOa5Zk=; b=O19PVe2L/0aXNxgPLyhPb8w6Sp nKuVjsn1qMFhWQsMddhnsavhxJox9cdxWE13H2FW74HQKEn+TFPm1hi2CPvQHIEw9uOsJrzyu5Y5k ONqAWhYz/mbbqXtDYrWrivVe3x/1BZAERDePJZ9ZLyTAsVybcj0vb+4H3ZAL2iMHPaP085RNGaJBy +OMPtcJKrZpMULnW1vHejvvo9/kRP3j0Ui2daorSwKMLccOabS9tbFd9DH8ARZCacQUVeYK8zvmZN zi1DSc0tcof9oVe2GuBWu4SZtL35rRYwXyxYKKWz7ucdpdWxW7XR1Qiz2a0qj7kRRH+oA3QQuEN5r SqhNpZGw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:43678) 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 1q98lf-0000Z9-GS; Tue, 13 Jun 2023 19:29:23 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1q98la-0006Fs-DQ; Tue, 13 Jun 2023 19:29:18 +0100 Date: Tue, 13 Jun 2023 19:29:18 +0100 From: "Russell King (Oracle)" To: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= Cc: Vladimir Oltean , 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 v2 2/7] net: dsa: mt7530: fix trapping frames with multiple CPU ports on MT7530 Message-ID: References: <20230611081547.26747-1-arinc.unal@arinc9.com> <20230611081547.26747-2-arinc.unal@arinc9.com> <20230613150815.67uoz3cvvwgmhdp2@skbuf> <20230613171858.ybhtlwxqwp7gyrfs@skbuf> <20230613172402.grdpgago6in4jogq@skbuf> <20230613173908.iuofbuvkanwyr7as@skbuf> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230613_112940_250688_8B19F605 X-CRM114-Status: GOOD ( 22.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gVHVlLCBKdW4gMTMsIDIwMjMgYXQgMDg6NTg6MzNQTSArMDMwMCwgQXLEsW7DpyDDnE5BTCB3 cm90ZToKPiBPbiAxMy4wNi4yMDIzIDIwOjM5LCBWbGFkaW1pciBPbHRlYW4gd3JvdGU6Cj4gPiBP biBUdWUsIEp1biAxMywgMjAyMyBhdCAwODozMDoyOFBNICswMzAwLCBBcsSxbsOnIMOcTkFMIHdy b3RlOgo+ID4gPiBUaGF0IGZpeGVzI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CkZUVFAgaXMgaGVyZSEgODBNYnBz IGRvd24gMTBNYnBzIHVwLiBEZWNlbnQgY29ubmVjdGl2aXR5IGF0IGxhc3QhCgpfX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpsaW51eC1hcm0ta2VybmVsIG1h aWxpbmcgbGlzdApsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0cDovL2xp c3RzLmluZnJhZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9saW51eC1hcm0ta2VybmVsCg== From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7B97EB64D7 for ; Tue, 13 Jun 2023 18:29:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239035AbjFMS3n (ORCPT ); Tue, 13 Jun 2023 14:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230491AbjFMS3k (ORCPT ); Tue, 13 Jun 2023 14:29:40 -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 39C2710CC; Tue, 13 Jun 2023 11:29:39 -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=DXfkpTd4BgNrWMUgFq3EjpQXH5nUJQkyJKKnkCOa5Zk=; b=O19PVe2L/0aXNxgPLyhPb8w6Sp nKuVjsn1qMFhWQsMddhnsavhxJox9cdxWE13H2FW74HQKEn+TFPm1hi2CPvQHIEw9uOsJrzyu5Y5k ONqAWhYz/mbbqXtDYrWrivVe3x/1BZAERDePJZ9ZLyTAsVybcj0vb+4H3ZAL2iMHPaP085RNGaJBy +OMPtcJKrZpMULnW1vHejvvo9/kRP3j0Ui2daorSwKMLccOabS9tbFd9DH8ARZCacQUVeYK8zvmZN zi1DSc0tcof9oVe2GuBWu4SZtL35rRYwXyxYKKWz7ucdpdWxW7XR1Qiz2a0qj7kRRH+oA3QQuEN5r SqhNpZGw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:43678) 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 1q98lf-0000Z9-GS; Tue, 13 Jun 2023 19:29:23 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1q98la-0006Fs-DQ; Tue, 13 Jun 2023 19:29:18 +0100 Date: Tue, 13 Jun 2023 19:29:18 +0100 From: "Russell King (Oracle)" To: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= Cc: Vladimir Oltean , 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 v2 2/7] net: dsa: mt7530: fix trapping frames with multiple CPU ports on MT7530 Message-ID: References: <20230611081547.26747-1-arinc.unal@arinc9.com> <20230611081547.26747-2-arinc.unal@arinc9.com> <20230613150815.67uoz3cvvwgmhdp2@skbuf> <20230613171858.ybhtlwxqwp7gyrfs@skbuf> <20230613172402.grdpgago6in4jogq@skbuf> <20230613173908.iuofbuvkanwyr7as@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 13, 2023 at 08:58:33PM +0300, Arınç ÜNAL wrote: > On 13.06.2023 20:39, Vladimir Oltean wrote: > > On Tue, Jun 13, 2023 at 08:30:28PM +0300, Arınç ÜNAL wrote: > > > That fixes port 5 on certain variants of the MT7530 switch, as it was > > > already working on the other variants, which, in conclusion, fixes port 5 on > > > all MT7530 variants. > > > > Ok. I didn't pay enough attention to the commit message. > > > > > And no, trapping works. Having only CPU port 5 defined on the devicetree > > > will cause the CPU_PORT bits to be set to port 5. There's only a problem > > > when multiple CPU ports are defined. > > > > Got it. Then this is really not a problem, and the commit message frames > > it incorrectly. > > Actually this patch fixes the issue it describes. At the state of this > patch, when multiple CPU ports are defined, port 5 is the active CPU port, > CPU_PORT bits are set to port 6. Maybe it's just me being dumb, but I keep finding things difficult to understand, such as the above paragraph. It sounds like you're saying that _before_ this patch, port 5 is the active CPU port, but the CPU_PORT *FIELD* NOT BITS are set such that port 6 is the active CPU port. Therefore, things are broken, and this patch fixes it. Or are you saying that after this patch is applied, port 5 is the active CPU port, but the CPU_PORT *FIELD* is set to port 6. If that's true, then I've no idea what the hell is going on here because it seems to be senseless. I think at this point I just give up trying to understand what the hell these patches are trying to do - in my opinion, the commit messages are worded attrociously and incomprehensively. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!