Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9855869rwr; Thu, 11 May 2023 23:37:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ76uHjHJ52rbkoZpKnLMpGIjy9xLwQg309z63HE0+q1PA4fhndULMp4t87hvVPWrnf5Gdyu X-Received: by 2002:a05:6a20:7d81:b0:101:4e04:cefc with SMTP id v1-20020a056a207d8100b001014e04cefcmr16000356pzj.51.1683873431961; Thu, 11 May 2023 23:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683873431; cv=none; d=google.com; s=arc-20160816; b=XgaWECSrwU6pmnAmmDIHG67X7Jht337BQl3JhvodbMmSPpdcii6o6Z1rEo3LpC7PUI pHjDX8j0Qr2IlLfZXpIQHgsbuU1iMbWFPaRWcRQsxFfFWEWtoePnZwoXR722ikhlcUxy iRgwLjdPlAU0L9bW0ZQP2qK6Y1nfD/vS+3TiiVH8gLHh2GrjCHbhPP+9BIDoRKwGcLNn zwF++HPsJe6aaK211hQy1J38a1C4JZC/hBeJqFTTlzcnEwW5KXUL4y54EFl6SbjzNKUh qi6lfTtEXn1Sjm5U4DQzdwHzYfnH2c8YSZ0ZikHVH0q2xcgwj28KfAePfmbe6v4SUqFx 9GsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=O1dFYZRvKs4qv+uZsl9ppvEEACIWA+psNysfH673qxs=; b=ZYAxdFO+MYz5kJfB/7V4OX0EI7OH8TMrVYtfPtm/DdZpyHT+LHsZyX0of2YbSOXudU 3zOUFABJxhU5uOiqsylSeGS82qFHEPiCvcyZqkj/wgt5Rq8gZIvNitZYy2gluToouq9R /M1QYf85cII465Le8XxJLXoGnV40ccydlhyb+UPKiYUk98oBls7uRy//eFMJtSlJjhOK KSwH6OyuqHLVVBcU7Ack5xL8OEnSoXd8QAwDVcF6tF61a5PRZuIQ3uvj5WIWpn8jUER8 tZONuGtGtVawB/dljWyqW0ArHq3eOKJ4itaSVU/ur0bbzAfA8UEjC3RHtemTRTFU70s2 XQwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Zdf+fefn; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a63b404000000b005287bffc5c0si8622247pgf.711.2023.05.11.23.36.57; Thu, 11 May 2023 23:37: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=@bootlin.com header.s=gm1 header.b=Zdf+fefn; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240005AbjELGeC (ORCPT + 99 others); Fri, 12 May 2023 02:34:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239991AbjELGeB (ORCPT ); Fri, 12 May 2023 02:34:01 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 312483C1B; Thu, 11 May 2023 23:33:38 -0700 (PDT) Received: (Authenticated sender: alexis.lothore@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 11F3C20009; Fri, 12 May 2023 06:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1683873217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O1dFYZRvKs4qv+uZsl9ppvEEACIWA+psNysfH673qxs=; b=Zdf+fefnpviYfTYSM6hSlNchA5psiLJSt3pN1J8qFDSD5pSgPcaJCR3vXhhGx7wILvKiHF GgyjFtafMX7T4HDX9RKIa22aZvZpdnUcGF0j/9Exbap6pe+dAn2piY7VgR+mUNs4vDfw5T 2KC/WJjhCLzEwW7WRhbeoJ+H6HLYZSV56hmyT910UCwz+30LRFQ3D23Go6CSQ66fmnX2Q6 G8Vo8Z4i21ELlJylwiJblQxBQjstRI5ZlK8wcWBtyLIuKWC3k4tZeQluShvUGZlPYTN+SD K0RjOUXUhwzQCR7GWNFW/EQAVch8gnP5rQ+z5jdLi+toYSlxpFWAi5H7UX5EiQ== Message-ID: <7a2c205a-70dc-0d62-9e7b-cf09f7f5aac7@bootlin.com> Date: Fri, 12 May 2023 08:33:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH net v2 2/3] net: dsa: rzn1-a5psw: fix STP states handling To: Vladimir Oltean Cc: andrew@lunn.ch, f.fainelli@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, herve.codina@bootlin.com, miquel.raynal@bootlin.com, milan.stevanovic@se.com, jimmy.lalande@se.com, pascal.eberhard@se.com References: <20230511170202.742087-1-alexis.lothore@bootlin.com> <20230511170202.742087-3-alexis.lothore@bootlin.com> <20230511213749.j2be7po5n2vgfwmu@skbuf> Content-Language: en-US From: =?UTF-8?Q?Alexis_Lothor=c3=a9?= In-Reply-To: <20230511213749.j2be7po5n2vgfwmu@skbuf> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, 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 Hello Vladimir, thanks for the fast review ! On 5/11/23 23:37, Vladimir Oltean wrote: > On Thu, May 11, 2023 at 07:02:01PM +0200, alexis.lothore@bootlin.com wrote: >> From: Clément Léger >> >> stp_set_state() should actually allow receiving BPDU while in LEARNING >> mode which is not the case. Additionally, the BLOCKEN bit does not >> actually forbid sending forwarded frames from that port. To fix this, add >> a5psw_port_tx_enable() function which allows to disable TX. However, while >> its name suggest that TX is totally disabled, it is not and can still >> allow to send BPDUs even if disabled. This can be done by using forced >> forwarding with the switch tagging mechanism but keeping "filtering" >> disabled (which is already the case in the rzn1-a5sw tag driver). With >> these fixes, STP support is now functional. >> >> Fixes: 888cdb892b61 ("net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver") >> Signed-off-by: Clément Léger >> Signed-off-by: Alexis Lothoré >> --- > > Reviewed-by: Vladimir Oltean > >> @@ -344,28 +376,35 @@ static void a5psw_port_bridge_leave(struct dsa_switch *ds, int port, >> >> static void a5psw_port_stp_state_set(struct dsa_switch *ds, int port, u8 state) >> { >> - u32 mask = A5PSW_INPUT_LEARN_DIS(port) | A5PSW_INPUT_LEARN_BLOCK(port); >> struct a5psw *a5psw = ds->priv; >> - u32 reg = 0; >> + bool learning_enabled, rx_enabled, tx_enabled; > > Absolutely minor comment: in the networking subsystem there is a coding > style preference to order lines with variable declarations longest to > shortest (reverse Christmas tree). Since I don't see another less > frivolous reason to resend the patch set, I thought I'd just mention > for next time. ACK. Since an error has been raised by CI bot on this series, I will send a V3 and fix this ordering too. Regards, -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com