Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3469929pxp; Tue, 8 Mar 2022 15:17:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoVsYJxIKmxrU1MFxNHtfRG7gu5q4xuHfTJjlLqBd5FCm2mqma6CzWQMp51DZKNYxULmtg X-Received: by 2002:a05:6a00:1a0b:b0:4cf:9a9:5c5f with SMTP id g11-20020a056a001a0b00b004cf09a95c5fmr20751708pfv.45.1646781426281; Tue, 08 Mar 2022 15:17:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646781426; cv=none; d=google.com; s=arc-20160816; b=eGK2/A7p43+pZ5rSLFgttyHr7SY0sMXj7i77iiWaa3BWtVEYgx+B7Ug8omgwk0h1bZ //7UbN2YJJ1HdHTG/bHkAg+nLsxygvq/5OuOIuG5tXbvsqK4+4bxQpNFx3Jg2JLOfC9a ykNs91sHFcv3/RRckD577Zpe2zYEvrnffAOTOYqAJKIEeDk0xfVZjCzTBtF3pCbOosY/ pLhpI92rXXwDXgxmXlbCkFisgudbu535RlfsIW0gFmW1p4FlbQl4zqPm6KYGNmCHbBdC 3RjbjdouO1EMSfRal29zI5ENGk/l/wsXruC+NHZGLl6cyYc0wTzra/UCKFwMZvmL0LNV XoVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=z+Sy3daXdZc7eFbdaSwLgS5WLdDuNus4al0ePtnegPY=; b=gFJV+wcu5ntpJHYMfZgZWHXOAUGqvMjDgXoraBQsk0horOiKbrLpJx24+OYkgd4ZXK n/3AOvhkqDSHpj9GS/6HCh6TqIhZC/ycZkkUnLaYYzOXwF/rrekkxKfkdSh/ZX/8r/vg gWNuWlvw8x/7v12e65etjCEkGqU4IFJfKoEhBWanlWEeLqH+Tgm/7RegyQyO64WjNH6h nP90t3RT33AvczrbKcZEZqRqsMdsXiO23QjhV8MPGyRo5rsnfKzTps1mMjFyws/ClcnL MtYB/Qwy9N7bpB01DCd4NMsJuUkJpPxhHJChU0nKJKJW+mxX1JweUlyBgOLEXGychG0O ppOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@waldekranz-com.20210112.gappssmtp.com header.s=20210112 header.b=nXjjimFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id mu9-20020a17090b388900b001bf71a5a42csi3823908pjb.42.2022.03.08.15.17.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 15:17:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@waldekranz-com.20210112.gappssmtp.com header.s=20210112 header.b=nXjjimFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 30E477D01F; Tue, 8 Mar 2022 15:11:50 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237259AbiCGOzH (ORCPT + 99 others); Mon, 7 Mar 2022 09:55:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243679AbiCGOys (ORCPT ); Mon, 7 Mar 2022 09:54:48 -0500 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F80E3B3FB for ; Mon, 7 Mar 2022 06:53:37 -0800 (PST) Received: by mail-lj1-x233.google.com with SMTP id v28so20792182ljv.9 for ; Mon, 07 Mar 2022 06:53:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waldekranz-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=z+Sy3daXdZc7eFbdaSwLgS5WLdDuNus4al0ePtnegPY=; b=nXjjimFe6hkuycvGrRtBjI1tKHAIDTQIMYAAXSkRjb2oWqSuB/56KJfDcJysox0MNW JZgo+cbfllhR/t2NrtkiFGFnBeuEt7tZGrh6Ib1Vw/0OuoHLacO0XOi4RuXFF1hOS2X+ s6QOSDr89qyk3k5+h2aCsvSU8ZtsqRhvqFiF2cVjVM1RB/b93R7oH8Q14UQI8nCEnil3 eU336Zo/Yf8z/RNW3DDQbY3LdduKL4XQr5ZrQcGUrgSwhtnFhpk7EIVYOKLR2bgX1BAf 0XvFoGwBTTXSZ0cC2JWcH8n5czQCnX8QfB0VzjYTnjo+EssdB9v3rjIJKtfhjIJqWEtG 0cIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=z+Sy3daXdZc7eFbdaSwLgS5WLdDuNus4al0ePtnegPY=; b=15UIw9Z+gGEoSJRIU6I+egsowHC2yYentec00aqHF//hQeOUukMefDs3Tbib3f8vpO m4cENLmkMbjrgdhYLIk1OWvwFpxR2BjFDE9IkXnHIPZ0gWhj8tRVsijYGqplSnjgx8m/ 7U6SIQyXArxD/JMFdhgBh67mawgynSh4hNzkfFt418DwOSWe3b7G8A28LnegjFPy1lER /B3Jacpuv6SEFb8w5owXd4jRTWPcTnXpEHhbL5DD2yja6hA08N1uY17N4FXAhWrMbWMl pK26VfddiCiu0b1n5gPjuSQZWGGdkCbIUy2MfI8eqxm8aKsCukH6/IRP7pAsQvXoZqwQ 9imA== X-Gm-Message-State: AOAM530v1LdoLtnwA4gA6y/rmuUnMc31L4BFI0xr1tqntGg1aB9yxc0y uGZyqAJLreK9B4SbuQ/Gwl1aVg== X-Received: by 2002:a2e:8882:0:b0:244:8a8a:212 with SMTP id k2-20020a2e8882000000b002448a8a0212mr8017210lji.220.1646664812423; Mon, 07 Mar 2022 06:53:32 -0800 (PST) Received: from wkz-x280 (a124.broadband3.quicknet.se. [46.17.184.124]) by smtp.gmail.com with ESMTPSA id u26-20020ac25bda000000b0044830ec5d05sm592057lfn.274.2022.03.07.06.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Mar 2022 06:53:31 -0800 (PST) From: Tobias Waldekranz To: Nikolay Aleksandrov , davem@davemloft.net, kuba@kernel.org Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Russell King , Petr Machata , Cooper Lees , Ido Schimmel , Matt Johnston , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bridge@lists.linux-foundation.org Subject: Re: [PATCH v2 net-next 01/10] net: bridge: mst: Multiple Spanning Tree (MST) mode In-Reply-To: References: <20220301100321.951175-1-tobias@waldekranz.com> <20220301100321.951175-2-tobias@waldekranz.com> Date: Mon, 07 Mar 2022 15:53:30 +0100 Message-ID: <87a6e1olud.fsf@waldekranz.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Wed, Mar 02, 2022 at 00:01, Nikolay Aleksandrov wrote: > On 1 March 2022 11:03:12 CET, Tobias Waldekranz wrote: >>Allow the user to switch from the current per-VLAN STP mode to an MST >>mode. >> >>Up to this point, per-VLAN STP states where always isolated from each >>other. This is in contrast to the MSTP standard (802.1Q-2018, Clause >>13.5), where VLANs are grouped into MST instances (MSTIs), and the >>state is managed on a per-MSTI level, rather that at the per-VLAN >>level. >> >>Perhaps due to the prevalence of the standard, many switching ASICs >>are built after the same model. Therefore, add a corresponding MST >>mode to the bridge, which we can later add offloading support for in a >>straight-forward way. >> >>For now, all VLANs are fixed to MSTI 0, also called the Common >>Spanning Tree (CST). That is, all VLANs will follow the port-global >>state. >> >>Upcoming changes will make this actually useful by allowing VLANs to >>be mapped to arbitrary MSTIs and allow individual MSTI states to be >>changed. >> >>Signed-off-by: Tobias Waldekranz >>--- >> include/uapi/linux/if_link.h | 1 + >> net/bridge/Makefile | 2 +- >> net/bridge/br_input.c | 17 +++++++- >> net/bridge/br_mst.c | 83 ++++++++++++++++++++++++++++++++++++ >> net/bridge/br_netlink.c | 14 +++++- >> net/bridge/br_private.h | 26 +++++++++++ >> net/bridge/br_stp.c | 3 ++ >> net/bridge/br_vlan.c | 20 ++++++++- >> net/bridge/br_vlan_options.c | 5 +++ >> 9 files changed, 166 insertions(+), 5 deletions(-) >> create mode 100644 net/bridge/br_mst.c >> > > Hi, > As I mentioned in another review, I'm currently traveling and will have pc access > end of this week (Sun), I'll try to review the set as much as I can through my phone in the > meantime. Thanks for reworking it, generally looks good. > A few comments below, > > >>diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h >>index e315e53125f4..7e0a653aafa3 100644 >>--- a/include/uapi/linux/if_link.h >>+++ b/include/uapi/linux/if_link.h >>@@ -482,6 +482,7 @@ enum { >> IFLA_BR_VLAN_STATS_PER_PORT, >> IFLA_BR_MULTI_BOOLOPT, >> IFLA_BR_MCAST_QUERIER_STATE, >>+ IFLA_BR_MST_ENABLED, > > Please use the boolopt api for new bridge boolean options like this one. Ahh, I was not aware of that. Will change it in v3. Thanks.