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 08925C38145 for ; Sat, 3 Sep 2022 02:48:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230429AbiICCsp (ORCPT ); Fri, 2 Sep 2022 22:48:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbiICCso (ORCPT ); Fri, 2 Sep 2022 22:48:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24E47654F; Fri, 2 Sep 2022 19:48:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D8A13B82D2A; Sat, 3 Sep 2022 02:48:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA749C433D6; Sat, 3 Sep 2022 02:48:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662173320; bh=3tuTu62i+EDrSJ1yXiAR1GlbDcTjwTm2SCW314HHXFI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=J2RfPJFu22l+OFQ56bAojRDj7GAMOyUqZ7KRD3gJ/XZqLCpGDN5GgX7NyAd3ex9bQ QGwCSWmYesze3HqhV0+AKSqwms1qMeewZ8fRdFCpb9bstMbrKdnEBn0NWjBaveaR9d 8/2EwMy3H/KJ2Usx3dMr54NgG47TbFEDzfei2u7fkl2l1LtGlZg0fqT1MRni3FdI2j m3Ruks2EyMETJnoBFZMtRnXGisPdOAaiyv9kXRYN8580XNwa6utjywoPneQauYCLJn gA/SqpgQuEOOiXSVwZ6NKBQHsF42g7XdVET5DKyAAA4Nfyv+mN4QeFcOv8mtZh3XhU UEYDrYVbcIUlA== Date: Sat, 3 Sep 2022 04:48:32 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Vladimir Oltean Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Vivien Didelot , Andrew Lunn , Vladimir Oltean , Claudiu Manoil , Alexandre Belloni , "UNGLinuxDriver@microchip.com" , Colin Foster , Roopa Prabhu , Nikolay Aleksandrov , Tobias Waldekranz , Ansuel Smith , DENG Qingfang , Alvin =?UTF-8?B?xaBpcHJhZ2E=?= , Linus Walleij , Luiz Angelo Daros de Luca , Felix Fietkau , John Crispin , Sean Wang Subject: Re: [PATCH net-next 0/9] DSA changes for multiple CPU ports (part 4) Message-ID: <20220903044832.125984e2@thinkpad> In-Reply-To: <20220902103145.faccoawnaqh6cn3r@skbuf> References: <20220830195932.683432-1-vladimir.oltean@nxp.com> <20220902103145.faccoawnaqh6cn3r@skbuf> X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 2 Sep 2022 10:31:46 +0000 Vladimir Oltean wrote: > On Tue, Aug 30, 2022 at 10:59:23PM +0300, Vladimir Oltean wrote: > > This series represents the final part of that effort. We have: > > > > - the introduction of new UAPI in the form of IFLA_DSA_MASTER > > Call for opinions: when I resend this, should I keep rtnl_link_ops, > or should I do what Marek attempted to do, and make the existing iflink > between a user port and its master writable from user space? > https://lore.kernel.org/netdev/20190824024251.4542-4-marek.behun@nic.cz/ > > I'm not sure if we have that many more use cases for rtnl_link_ops.. > at some point I was thinking we could change the way in which dsa_loop > probes, and allow dynamic creation of such interfaces using RTM_NEWLINK; > but looking closer at that, it's a bit more complicated, since we'd need > to attach dsa_loop user ports to a virtual switch, and probe all ports > at the same time rather than one by one. My opinion is that it would be better to add new DSA specific netlink operations instead of using the existing iflink as I did in the that patch. I think that DSA should have it's own IP subcommands. Using the standard, already existing API, is not sufficient for more complex configurations/DSA routing settings. Consider DSA where there are multiple switches and the switches are connected via multiple ports: +----------+ +---------------+ +---------+ | eth0 <---> sw0p0 sw0p2 <---> sw1p0 | cpu | | | | .... | eth1 <---> sw0p1 s20p3 <---> sw1p1 +----------+ +---------------+ +---------+ The routing is more complicated in this scenario. The old API is not sufficient. Marek