Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2718895rwd; Fri, 26 May 2023 10:10:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43IgSazQehang8fYiZxsj7gCSZ6bn2AUmAz3Xrs20yi+cc6zpLUMgm6Xxd8IfqYcVULF1K X-Received: by 2002:a17:90a:1b61:b0:24e:2759:8dbe with SMTP id q88-20020a17090a1b6100b0024e27598dbemr3272259pjq.7.1685121011965; Fri, 26 May 2023 10:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685121011; cv=none; d=google.com; s=arc-20160816; b=QxBgnW07+2+afVx0DugBmXzTrPRX5au5l3L286/A9SvMPlrHVKgiFRpaegsbxsVXzR XenVl2bDU6PXNs/0NDObFQTeLePc1pb4YHOhvEwEkCZyqxWSzbNW+fEtvTyPRpQp7vtb u8mTCRgH5HNJXzKqHnWHFLmyZLpV4UDsC6TUxiAWjkad3qaX+ZNg/yla6nc672+ntw4Z ZRd0Fii/rTNmXJ67cR8dAuqaWtW4l/ccT2gYnkmBq0ipWpTMTwAiMWWkq6zJu9AsxyKO XGSkQS9gZNCiqIMeIRAbJwOmfuO42WtcJQNNQDaZz0NbtrBY1vLASpMvdbTBUG/SDa1z NwTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BVB1oaEqb0nCh7/TkolrkD30I0YxpmZoZt03ZQMqTUU=; b=I/1YpJRTssF4ZMBohY9O4dqKkdqXQqKbr0WjNHGgcOgQXdm3xg6QFrLJv5dujUF74n WbA5SpbfDLIHDRqPZpTCUyr+wqxR5ibelWKxBAPSA+AdYIARlRh7KZgH2qaq/mUl6J27 9WblBQRmpjKcUkSLTKZl8Q4BBWKGOt45tI6gO18avWsztfF/IrwlGWLVU6hSi2oveYlE /eupZzk6bOQ2ENdE0tcK4TPI5Fq70YXoYUUKln5qQf49ECOp1ktt26g6kXI5ZPya4k0W l0T/fqJphBSTEe0fBiKlOsijCigectxY6arMGnIFgbc8tSpgNhU1SrtK/sbbtPkTGmZK gAow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=HOONLSKA; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i189-20020a6387c6000000b0053f352478fasi3477527pge.307.2023.05.26.10.09.58; Fri, 26 May 2023 10:10:11 -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=@gmail.com header.s=20221208 header.b=HOONLSKA; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242084AbjEZQ4E (ORCPT + 99 others); Fri, 26 May 2023 12:56:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237228AbjEZQ4D (ORCPT ); Fri, 26 May 2023 12:56:03 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 932C212A; Fri, 26 May 2023 09:55:53 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-514859f3ffbso319530a12.1; Fri, 26 May 2023 09:55:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685120152; x=1687712152; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=BVB1oaEqb0nCh7/TkolrkD30I0YxpmZoZt03ZQMqTUU=; b=HOONLSKAnH/QqPHu9WT2rWuKt7J+3VuaOtzRIn0ktdQRHt+mj3noIyD8rvM4NEKBQl WMe/8Ik+L397mXmmOetDYl3Dk6BdBBRGfQj8TeFbdpfv9m+iui0umv+J07nt1IKaF0YC B2AE8wTu7VvhuGrjCwwO52nHkz2NnGL78TWkuOA/znZ4IS/Ze8GjhmoyAIQm390K7gM3 LxpsB7Yzn+4pxiuKskquw40slwV2sRrES7up5wDCg/fh3PhlTBScEDFRlurN2sK+XtDf kK2t4TawNMnAcGtv3LET3DG3PC0gmzxbAYb3el0EQMjjwd8kpJ2JCXTl2YnPlS702HEi XfuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685120152; x=1687712152; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BVB1oaEqb0nCh7/TkolrkD30I0YxpmZoZt03ZQMqTUU=; b=O9aKgkdrJPi2rai3Cprez5kkZTqY1tD0OuHCUgCUUFlioIC1PbYXjiI+zBgCbQt69H HfWaySdeW8WwEer3N8Qv+l8O4uIlJ8IhSo5pgrq4Vci7sRkDpRCGCyKWJu/Sp3qTpVM8 E4xTLyjM4iww5FsBTTeUWdI0fiCnUJLDiawta7aVnYICALi4t6i1xlHS3/L4Y4BI+Bf4 7SjzlGxS7+yTrTyPtCdxRiITjHCm3zUWBI4t9OLE+sZGlTqIBl/Ghju62IFFpXnRCD6F EPUrCp7g3j+RzRY26uEoxBAahe11zJ0UszbqioL16nALCmwdaSeAhHhaAOCur1lJ4drT gCuA== X-Gm-Message-State: AC+VfDz+B/sd0QuOq0j7xko1BiRMLcmqNdMk6OAfZmwZ1yW4VSouYVhy JME6X0g9flOQQLRWpN94wvg= X-Received: by 2002:a50:fb17:0:b0:514:7a67:44dc with SMTP id d23-20020a50fb17000000b005147a6744dcmr1516263edq.19.1685120151838; Fri, 26 May 2023 09:55:51 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id w17-20020a056402071100b0050c03520f68sm127797edx.71.2023.05.26.09.55.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 09:55:51 -0700 (PDT) Date: Fri, 26 May 2023 19:55:48 +0300 From: Vladimir Oltean To: arinc9.unal@gmail.com Cc: Sean Wang , Landen Chao , DENG Qingfang , Daniel Golle , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , Richard van Schagen , Richard van Schagen , Frank Wunderlich , Bartel Eerdekens , erkin.bozoglu@xeront.com, mithat.guner@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net-next 26/30] net: dsa: mt7530: properly set MT7530_CPU_PORT Message-ID: <20230526165548.d6ewov743orxviz3@skbuf> References: <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-27-arinc.unal@arinc9.com> <20230522121532.86610-27-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: <20230522121532.86610-27-arinc.unal@arinc9.com> <20230522121532.86610-27-arinc.unal@arinc9.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Mon, May 22, 2023 at 03:15:28PM +0300, arinc9.unal@gmail.com wrote: > From: Arınç ÜNAL > > The MT7530_CPU_PORT bits represent the CPU port to trap frames to for the > MT7530 switch. There are two issues with the current way of setting these > bits. ID_MT7530 which is for the standalone MT7530 switch is not included. It's best to say in the commit title what the change does, rather than the equivalent of "here, this way is proper!". Commit titles should be uniquely identifiable, and "properly set MT7530_CPU_PORT" doesn't say a lot about how proper it is. It's enough to imagine a future person finding something else that's perfectible and writing another "net: dsa: mt7530: properly set MT7530_CPU_PORT" commit. Try to be less definitive and at the same time more specific. If there are 2 issues, there should be 2 changes with individual titles which each describes what was wrong and how that was changed. > When multiple CPU ports are being used, the trapped frames won't be > received when the DSA conduit interface, which the frames are supposed to > be trapped to, is down because it's not affine to any user port. This > requires the DSA conduit interface to be manually set up for the trapped > frames to be received. > > Address these issues by implementing ds->ops->master_state_change() on this > subdriver and setting the MT7530_CPU_PORT bits there. Introduce the > active_cpu_ports field to store the information of active CPU ports. > Correct the macros, MT7530_CPU_PORT is bits 4 through 6 of the register. > > Any frames set for trapping to CPU port will be trapped to the numerically > smallest CPU port which is affine to the DSA conduit interface that is set > up. To make the understatement obvious, the frames won't necessarily be > trapped to the CPU port the user port, which these frames are received > from, is affine to. This operation is only there to make sure the trapped > frames always reach the CPU. > > Tested-by: Arınç ÜNAL > Co-developed-by: Vladimir Oltean > Signed-off-by: Vladimir Oltean A single Suggested-by: is fine. As a rule of thumb, I would use Co-developed-by when I'm working with a patch formally pre-formatted or committed by somebody else, that I've changed in a significant manner. Since all I did was to comment with a suggestion of how to handle this, and with a code snippet written in the email client to a patch of yours, I don't believe that's necessary here. > Signed-off-by: Arınç ÜNAL > ---