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 45DD0C54EBE for ; Fri, 13 Jan 2023 14:15:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239679AbjAMOPf (ORCPT ); Fri, 13 Jan 2023 09:15:35 -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> 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