Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp253337rwe; Wed, 31 Aug 2022 21:18:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR7tbWjRiJL64HvyaMi50ZfONgg5mVweU9O2rvTPYDxQ1Csd8mT1VLW6kDUqVSxfFQyHQPTx X-Received: by 2002:a17:90b:1a88:b0:1f7:3daa:f2f6 with SMTP id ng8-20020a17090b1a8800b001f73daaf2f6mr6674007pjb.245.1662005892808; Wed, 31 Aug 2022 21:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662005892; cv=none; d=google.com; s=arc-20160816; b=wYBNskREd02QpTwPoZ6w0ftpEpP3uW/iPJ/gZsGyDFGLYLR748XEUDcSWIHIisrurm CC/I+IqMNJo7LSiPnLI21KMqfbEaw8AL5K7Q7rLphGrD4KPGSqqTcWPvA6hXXTU35mhZ bJSrX5QpNaffWp5W9vUx1d/5bnBmC5MkFX/ejl3lAwGiVEn1AwYjuknbzHdN34ax7/xc LKNTW7Zdp1t0Fsm7EDxtJtpXiZ1fhCZZRbpcE2ilTqiBCgRbQj2PO98zX9GUL8sWjFd5 Ca0p+4KxaonuNDPOuzFUGIXQm263yp8ckhGcw0ZBVV26WqMuZFiwNdeQiKhHszpH5ZTS GePA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=kbD+GHzfABmYvoYa55I4OoitW1Kbi7PFUL9PRxgus2w=; b=eHwoUgKEVZYAdEcp90/RGHrhoaanTzFyR0Ex29Q8E+oHUNM6fhYdStQmNKnmTNySwy Ue/ElkKNK0lXOeJxfMOmq2ESzkFxf+m/eB6QAjC3AwNajYq1CLP2/UyzmxKMIJXRDh7C 0RJ1W5uDPZARTs4HORFK6824qShsUs8lum99bI2KJJb1WVftYkr68o61OL2mYv3H1Mtx vHFPJzU5JOZBkJSK7NKYJ7aHKnOqyTTS2Hq+BVecuqTTVGYOExXMfWmmNnmfw9Y8zK3O aq5uxEe2+F6T4xuLHnp3zCf2HadxnoOtBxafAYhbxBN3gPomlGQmHiudNpNmiIZcMdwU MdIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WRYNiJHk; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x40-20020a056a0018a800b00536ee478380si6448039pfh.7.2022.08.31.21.18.01; Wed, 31 Aug 2022 21:18:12 -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=@kernel.org header.s=k20201202 header.b=WRYNiJHk; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232245AbiIADu1 (ORCPT + 99 others); Wed, 31 Aug 2022 23:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbiIADuZ (ORCPT ); Wed, 31 Aug 2022 23:50:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E608A54645; Wed, 31 Aug 2022 20:50:23 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 38DAE60FD2; Thu, 1 Sep 2022 03:50:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C839FC433D6; Thu, 1 Sep 2022 03:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662004222; bh=NPbps7uPi2UsccwPgkn9NiGkpZleO4/g+eTbkUXig4s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WRYNiJHkkijy4XhK08vHhmuHFAK6ZNTm8q/gu0t1Hl6+uNLCJXJmiqO6Ft1BUyhG2 tIousn1ukS0L3HRngmo9sLCUA2p60Wx3kJO529qJvkRQzxFsvzMMaNHAXL3NyelVlw OUccvDPZssOUjvlpdzp8YF10FEf4Zs5CozJ90QbhceTTXfzDo6TghxeGhX/dpcaXD2 rwCDWVzXGfM33dxa8Ol6s+F3xs2S0ptnuZ/YOh5mW8YWm1t9EwWHWxbx0ryZCLH3dV ySsOAVULIXjUbke2Q2CejP6PsL2OgdbhhZ5rYNgvMx3QFvebX8Kb8jGR5/wxFmHTWg CaBeyl2igvcKA== Date: Wed, 31 Aug 2022 20:50:20 -0700 From: Jakub Kicinski To: Vladimir Oltean Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , 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 , Marek =?UTF-8?B?QmVow7pu?= , 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 3/9] net: dsa: allow the DSA master to be seen and changed through rtnetlink Message-ID: <20220831205020.28fbfcc5@kernel.org> In-Reply-To: <20220830195932.683432-4-vladimir.oltean@nxp.com> References: <20220830195932.683432-1-vladimir.oltean@nxp.com> <20220830195932.683432-4-vladimir.oltean@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Tue, 30 Aug 2022 22:59:26 +0300 Vladimir Oltean wrote: > Some DSA switches have multiple CPU ports, which can be used to improve > CPU termination throughput, but DSA, through dsa_tree_setup_cpu_ports(), > sets up only the first one, leading to suboptimal use of hardware. >=20 > The desire is to not change the default configuration but to permit the > user to create a dynamic mapping between individual user ports and the > CPU port that they are served by, configurable through rtnetlink. It is > also intended to permit load balancing between CPU ports, and in that > case, the foreseen model is for the DSA master to be a bonding interface > whose lowers are the physical DSA masters. >=20 > To that end, we create a struct rtnl_link_ops for DSA user ports with > the "dsa" kind. We expose the IFLA_DSA_MASTER link attribute that > contains the ifindex of the newly desired DSA master. net/dsa/port.c: In function =E2=80=98dsa_port_change_master=E2=80=99: net/dsa/port.c:1414:13: warning: unused variable =E2=80=98port=E2=80=99 [-W= unused-variable] 1414 | int port =3D dp->index; | ^~~~ I presume you had a look around what side effects setting rtnl_link_ops will have? Should .netns_refund be true?