Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1674253rwd; Tue, 13 Jun 2023 12:25:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Iw3AIqSg0DxDLOBJ+o6qdXA0bhX0VBmZ+5Nl16naKXyo2JWuibnUt1dsm/LclSXNgN/wG X-Received: by 2002:a05:6a21:29ca:b0:10b:26b9:57c3 with SMTP id tv10-20020a056a2129ca00b0010b26b957c3mr11066560pzb.14.1686684353505; Tue, 13 Jun 2023 12:25:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686684353; cv=pass; d=google.com; s=arc-20160816; b=ExsjV7SWnEO0zJowAaje5PF1//qLQepSC8sxcx72zYHiOLt1fuPMqT/PZ/lryy4P5X JV0hEMKRIZ1NwAh0JNqHbkFTy52vU9/gXxto5UfHsC4IFUTEYEUyrfa1m48albJO23Xy aOBhaMf3PTQcsnH4xjRTL7/HSsqCyryv0yTNd5z7BxVFo/b/ZnwjISxYRMpNk46Rmbp+ +BbhLwyN8yth8SCxCxhDBLYVurELgqnfDg6FhORnXkaNJhn+YctakBp+trzBiiZlbA/W gUpA2BFcuJJorRkvuoI/CZKteJBupp44SoDNmJclhd5/FULMv0jU383KCR6u6C9Z8q78 UiCQ== 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=uiH7vYDdKBG27kF+I7dWBVGcjs92hl+Mhg5MODORnKY=; b=g+rp6d4hqrV4QNn22AFPWU44q+CtBG59yHA0dZMZbeSL752YtQdn3iFgvWqz5pmShY KlYBn1uU1qomSRZuJoTWvIdsbCjGMOCMj6O6xauUCSUS42/eMQQt6Xc/Arpe7poUCeyu fQ2QyP5fFe7+rCqVhG1yXUNGAYHoI3jcDVHRMHm9i6gH81LfVqdtb2l4WVIIDTRF2Hjt 6WmtLQtGkaSZDTeGGKxgEOP/fdhLCBJOfeYQoT/Bq8+y/aM1AygHWAVDXUNCf24OPOiv rX+H5+4kRH7/P5oW6yXNTIvrgUnk8US1y2mUDBXDdKblZx6Wk+o6BtmmIYjuUpM8aVqU HQlg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=HOq2vlqP; 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 y7-20020aa79427000000b00662c06a0a75si6716615pfo.15.2023.06.13.12.25.41; Tue, 13 Jun 2023 12:25:53 -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=HOq2vlqP; 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 S230362AbjFMSrl (ORCPT + 99 others); Tue, 13 Jun 2023 14:47:41 -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 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 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ç