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 86DD4EB64D0 for ; Tue, 13 Jun 2023 18:47:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239644AbjFMSrm (ORCPT ); Tue, 13 Jun 2023 14:47:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232120AbjFMSri (ORCPT ); Tue, 13 Jun 2023 14:47:38 -0400 Received: from sender4-op-o10.zoho.com (sender4-op-o10.zoho.com [136.143.188.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1908B1BDC; Tue, 13 Jun 2023 11:47:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686682012; cv=none; d=zohomail.com; s=zohoarc; b=KEL7Jb5YQjmVNbB+D900PtJR3A+dy4BT/QAT7b+GjimFtPHIuXfyTgv5NIm7gxutV4x5vQKgLZUlfNBoZDEgqOcWZK/vTUosd3A+8lYkwIImMuYBVaFwATP9hZDKYc7ch1ijYGmpmTsBeejFecmqKTwKUAukLBzWl5lE4fgyb4Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686682012; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=uiH7vYDdKBG27kF+I7dWBVGcjs92hl+Mhg5MODORnKY=; b=WKNTsifaIG1pf29yatyQwfndRDtajYaqWJ3EJRYt0Lhxyc4m4rpelsHbFf/0vc46mHj+p4jUbX8eMt7hYiyuCeC2NNSwNFawMVD0+Um9CgwciA4owJTQh+XsJowreTyMDAe1HKr4k2VWX8ComO1u0yNbuSsWCwumT29hivI94Cg= 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=1686682012; 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=uiH7vYDdKBG27kF+I7dWBVGcjs92hl+Mhg5MODORnKY=; b=HOq2vlqPgyUjt/haud1M/WXgc3cXGYtuMUBbyuZ1eO9umcu3CXRghUxBJLvoy7z9 cEZMQhrDwualnycWhgKqyJxNDdEmw1lr+DLY3UJMloKpv3rCBPeLgIFd0kC4hlBsbxd BGxGoCCMmYQMecukmywbZftEx6PcLWCcbTW4TCIA= Received: from [192.168.1.248] (178-147-169-233.haap.dm.cosmote.net [178.147.169.233]) by mx.zohomail.com with SMTPS id 1686682011978174.9268291902241; Tue, 13 Jun 2023 11:46:51 -0700 (PDT) Message-ID: Date: Tue, 13 Jun 2023 21:46:42 +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 v2 2/7] net: dsa: mt7530: fix trapping frames with multiple CPU ports on MT7530 Content-Language: en-US To: "Russell King (Oracle)" 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 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> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ZohoMailClient: External Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13.06.2023 21:29, Russell King (Oracle) wrote: > 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. Yes, CPU_PORT field, and yes this patch fixes the issue by setting the field to 5 when multiple CPU ports are used. Because before this patch, the active CPU port is 5. The CPU_PORT field must match this. > > 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. No, when the "prefer port 6" patch is applied, the active CPU port will be port 6. The CPU_PORT field will always be set to 6, regardless of "net: dsa: mt7530: fix trapping frames with multiple CPU ports on MT7530". Therefore, the "prefer port 6" patch makes "net: dsa: mt7530: fix trapping frames with multiple CPU ports on MT7530" redundant. "net: dsa: mt7530: fix trapping frames with multiple CPU ports on MT7530" becomes important after the changing the DSA conduit support is introduced. > > 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. If that's how you feel, you can tune in to v5 where I will address the patch logs. Arınç