Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2937254rwb; Mon, 16 Jan 2023 01:14:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXtrc3QCTom1bO0bIif6rsvx112jb3yNW7naxmz9xWy3xJ6nhA1imSNlDmXz23/tiiKg4T/m X-Received: by 2002:a17:902:c7d5:b0:193:678:df13 with SMTP id r21-20020a170902c7d500b001930678df13mr16125659pla.36.1673860475366; Mon, 16 Jan 2023 01:14:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673860475; cv=none; d=google.com; s=arc-20160816; b=BJz16OgJioNsMVeSDE+v5C/hvD5r5Ayss5QFgJxW6I4gs16zhpaOBqJf6urRbuKSQn RPrfaa+gtcIDpXlkTw/uIhi27bsz6kz+g/pyqaUpGEA2pTcwUP4IU1tygMxG5ALjq4WY /0lQ7j+rFONG1ewwTphBzWcBUlGwwqpNdT4Ctkx/rp+mmMbT2Dzc5G2ho6p3ng3tWBfY +eytbTOOwrUaGdkbPAezHQFrY7hIRPyiJevoQ7MLOeUWls4rUN1vm4AbZsu9j+qI5gS3 R76XWwWDdmN/l2/Waa+ZkuT7MRbms1z304Z/cQ2mrTdJ9rtCh9V2azu6ahTxAFyxdlPG vicQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=jKlqXRziLzS7Xh6vcawTt0PG/It1v0slhKbICt31lUQ=; b=XPwlmt86LRq3SMX0WmGO5bBMQRyl3HcXypmKC2hIlu9AqjpmpNuOskeZtgW5HaNd+p XtW3DYF6l1SboTWNr4XKSkUgU2KwIkw4hxLdQM88BC3wusVvcVRxL0Y1P0kPwvLzAw0R /8a7/VqJftFKYoP0MRdC0FaxnrUivlFed/8hK076FaH0dABnndOXLRDI1n3w7LoiQgat RnD+X/PYmksUvUMAfCaN23q6EAjXdiH++LawG6bwlFRtkdyteygeiEO/EY35J/XaeKPt E094bB34f+Wr8QX/h2aAxhUcSpbW9RVnid3di/eCdvu2iJdjwrBLed965roud/W2pYjZ n89Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="GKM/ipfM"; 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 o17-20020a170902779100b00189005c48aesi26786383pll.108.2023.01.16.01.14.29; Mon, 16 Jan 2023 01:14:35 -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=@bootlin.com header.s=gm1 header.b="GKM/ipfM"; 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 S232141AbjAPIIw (ORCPT + 51 others); Mon, 16 Jan 2023 03:08:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232218AbjAPIIG (ORCPT ); Mon, 16 Jan 2023 03:08:06 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EBE312060; Mon, 16 Jan 2023 00:06:29 -0800 (PST) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id B40B3FF803; Mon, 16 Jan 2023 08:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1673856388; 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=jKlqXRziLzS7Xh6vcawTt0PG/It1v0slhKbICt31lUQ=; b=GKM/ipfMwzxvNvBkS2EmIVMLbKO5PqeE8Bj45ZxnA8pUUYbgJ9G0fh9ekxdn8drbt8UgKj qjRFMeup/uk4imU22mKV7vUhcNCv+un9Bo2VXenVlmRXHGlxbWBJmYaf5OBXosqIYCf2N7 vZZDgP4Wen0f2kltgpgIGUQigSqwphxM79QmBGoIDDrSSYyQmR3t9BLNh3RHJCKEDAqWiL VMpIpFZlsdhbMJp2Pf8IfCiVxc/pptGJQCgCHsnRkFLhO9ou/7wK01MQLu6IYdFvCVKI1q RlKhYwTEqD9mauyiq+PZzFzL9Kuuid/FEw4svtlVXWJ0gmoyGEC9sD68V/eaIA== Date: Mon, 16 Jan 2023 09:08:37 +0100 From: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= To: Vladimir Oltean Cc: Andrew Lunn , Jakub Kicinski , Florian Fainelli , "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 , =?UTF-8?B?TWlxdcOobA==?= Raynal , Milan Stevanovic , Jimmy Lalande , Pascal Eberhard Subject: Re: [PATCH net-next] net: dsa: rzn1-a5psw: Add vlan support Message-ID: <20230116090837.105b42a9@fixe.home> In-Reply-To: <20230113153730.bcj5iqkgilgmgds3@skbuf> References: <20230111115607.1146502-1-clement.leger@bootlin.com> <20230112213755.42f6cf75@kernel.org> <20230113153730.bcj5iqkgilgmgds3@skbuf> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.36; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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 Le Fri, 13 Jan 2023 17:37:30 +0200, Vladimir Oltean a =C3=A9crit : > On Fri, Jan 13, 2023 at 03:12:40PM +0100, Andrew Lunn wrote: > > On Thu, Jan 12, 2023 at 09:37:55PM -0800, Jakub Kicinski wrote: =20 > > > On Wed, 11 Jan 2023 12:56:07 +0100 Cl=C3=A9ment L=C3=A9ger wrote: =20 > > > > 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. =20 > > >=20 > > > noob question - do you need that mutex?=20 > > > aren't those ops all under rtnl_lock? =20 > >=20 > > Hi Jakub > >=20 > > 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. =20 >=20 > That being said, port_vlan_add(), port_vlan_del() and port_vlan_filtering= () > are all serialized by the rtnl_lock(). Ok then, I'll remove this lock and rely on the RTNL lock. Thanks, --=20 Cl=C3=A9ment L=C3=A9ger, Embedded Linux and Kernel engineer at Bootlin https://bootlin.com