Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp965184rwb; Fri, 13 Jan 2023 06:23:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXt5ZriiLwn3iA6RL/a3WxLHJsqGE0PFVcMfZxa0a2Cc5aCx6FdRP8VnJdLDA81y3F/YSWv9 X-Received: by 2002:a17:902:76c3:b0:194:7696:c024 with SMTP id j3-20020a17090276c300b001947696c024mr819902plt.5.1673619787024; Fri, 13 Jan 2023 06:23:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673619787; cv=none; d=google.com; s=arc-20160816; b=YN/DyP8HL6HGXon29AewIvGxHTxHLAWCz4EY4B14I58xYPQGniitIvrqSS6RFwCQ80 ge31uuMtm1pbVA1ahKzDd6GU+vtW+uccRBJ68udGD3f1WfMywDWuirKczUaTLa+ETxzk cobm2UtKLS26HaiMRY/X93AKxyF/ZXVMpKpISNnw+hYkOiq240jiK0ttN2hUXZglxInc AxVA3uNcqrSln5Uenr7nHmRr7l0o0zZCau2ic2nmjqm2Xoyba3l5i1JHPqB5Ciy0NLHC U65dLZyI4EyeHJretHE9ySHY8OmKDXelM/WLj+eC1GqMZLkrvGjJz+leHdlDw3oEdDCt 1PZg== 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=tHeGtSvlWJlFggYowRpfbMojybMJOk2BXEnuJhsk0fI=; b=JbXCxJYZF4yhbPqYTi85djBEWikyhQoPIoCcNNXlPlfXI5gou80WLUAYBBuhgvnCpv +SvSxxxWY4w4SJoLjb2xotLNwc/MGmupSqDNsOTsvbhchVskbnwrRiXP4vHBwJdqV6Fd 4rbgSybcf/uuvgB8Q1LSlDMpmARmc/G4lpeWynwvB1lAMEDyCIGCigGxVw6Bd2DQsfGY /DZ3kgyo0ZUjDeTuiq1XoHz4iK3doDflHdB2zNnY0+7PgBmlc2f0sCpYFVjNAy7S6Dy3 BLNXErYbRDoSvngGq4ujvrGuCtlzMqkWgZ3yf5QTw7VjxmScCAKxqOXwe9ia9kkQ+w6Y k97g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=3sO1hliQ; 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=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h4-20020a170902f54400b0019282cb9cf1si23005821plf.201.2023.01.13.06.23.00; Fri, 13 Jan 2023 06:23:07 -0800 (PST) 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=@lunn.ch header.s=20171124 header.b=3sO1hliQ; 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=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234620AbjAMOPd (ORCPT + 53 others); Fri, 13 Jan 2023 09:15:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242036AbjAMONw (ORCPT ); Fri, 13 Jan 2023 09:13:52 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 718521CB0F; Fri, 13 Jan 2023 06:12:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=tHeGtSvlWJlFggYowRpfbMojybMJOk2BXEnuJhsk0fI=; b=3s O1hliQjZRFEHblcq7Gvep0JYoGWuBJ+ijFxNK7O8MkIQuuClBbgCtId/OhMZj84w6w/1J9GNSJ0yd hrN/+nHk0sKXD6J8MhTnWA7Cb/ieJ7LMgcBl+6MQZNX9doQ0Anx1U4hYr6DzNhFGa5LUGQlJYRFqF rCDTilSqjycGuxo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pGKnQ-0020U3-CN; Fri, 13 Jan 2023 15:12:40 +0100 Date: Fri, 13 Jan 2023 15:12:40 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Paolo Abeni , Russell King , linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Herve Codina , =?iso-8859-1?Q?Miqu=E8l?= Raynal , Milan Stevanovic , Jimmy Lalande , Pascal Eberhard Subject: Re: [PATCH net-next] net: dsa: rzn1-a5psw: Add vlan support Message-ID: References: <20230111115607.1146502-1-clement.leger@bootlin.com> <20230112213755.42f6cf75@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230112213755.42f6cf75@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 Thu, Jan 12, 2023 at 09:37:55PM -0800, Jakub Kicinski wrote: > On Wed, 11 Jan 2023 12:56:07 +0100 Cl?ment L?ger wrote: > > Add support for vlan operation (add, del, filtering) on the RZN1 > > driver. The a5psw switch supports up to 32 VLAN IDs with filtering, > > tagged/untagged VLANs and PVID for each ports. > > noob question - do you need that mutex? > aren't those ops all under rtnl_lock? Hi Jakub Not commenting about this specific patch, but not everything in DSA is done under RTNL. So you need to deal with some parallel API calls. But they tend to be in different areas. I would not expect to see two VLAN changes as the same time, but maybe VLAN and polling in a workqueue to update the statistics for example could happen. Depending on the switch, some protect might be needed to stop these operations interfering with each other. And DSA drivers in general tend to KISS and over lock. Nothing here is particularly hot path, the switch itself is on the end of a slow bus, so the overhead of locks are minimum. Andrew