From: Nikolay Aleksandrov <razor@blackwall.org>
To: Tobias Waldekranz <tobias@waldekranz.com>,
davem@davemloft.net, kuba@kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
Jiri Pirko <jiri@resnulli.us>, Ivan Vecera <ivecera@redhat.com>,
Roopa Prabhu <roopa@nvidia.com>,
Russell King <linux@armlinux.org.uk>,
Ido Schimmel <idosch@nvidia.com>, Petr Machata <petrm@nvidia.com>,
Cooper Lees <me@cooperlees.com>,
Matt Johnston <matt@codeconstruct.com.au>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
bridge@lists.linux-foundation.org
Subject: Re: [PATCH v3 net-next 01/14] net: bridge: mst: Multiple Spanning Tree (MST) mode
Date: Mon, 14 Mar 2022 13:09:05 +0200 [thread overview]
Message-ID: <037a8f48-29c5-ae45-b562-df15dbe6d163@blackwall.org> (raw)
In-Reply-To: <9c103a85-f0e2-77cd-9fc6-dc19d99b19ec@blackwall.org>
On 14/03/2022 12:37, Nikolay Aleksandrov wrote:
> On 14/03/2022 11:52, 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 <tobias@waldekranz.com>
>> ---
> [snip]
>> diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
>> index 48bc61ebc211..35b47f6b449a 100644
>> --- a/net/bridge/br_private.h
>> +++ b/net/bridge/br_private.h
>> @@ -178,6 +178,7 @@ enum {
>> * @br_mcast_ctx: if MASTER flag set, this is the global vlan multicast context
>> * @port_mcast_ctx: if MASTER flag unset, this is the per-port/vlan multicast
>> * context
>> + * @msti: if MASTER flag set, this holds the VLANs MST instance
>> * @vlist: sorted list of VLAN entries
>> * @rcu: used for entry destruction
>> *
>> @@ -210,6 +211,8 @@ struct net_bridge_vlan {
>> struct net_bridge_mcast_port port_mcast_ctx;
>> };
>>
>> + u16 msti;
>> +
>> struct list_head vlist;
>>
>> struct rcu_head rcu;
>> @@ -445,6 +448,7 @@ enum net_bridge_opts {
>> BROPT_NO_LL_LEARN,
>> BROPT_VLAN_BRIDGE_BINDING,
>> BROPT_MCAST_VLAN_SNOOPING_ENABLED,
>> + BROPT_MST_ENABLED,
>> };
>>
>> struct net_bridge {
>> @@ -1765,6 +1769,29 @@ static inline bool br_vlan_state_allowed(u8 state, bool learn_allow)
>> }
>> #endif
>>
>> +/* br_mst.c */
>> +#ifdef CONFIG_BRIDGE_VLAN_FILTERING
>
> There is already such ifdef, you can embed all MST code inside it.
>
My bad, I somehow confused the function placement. This is good. :)
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
next prev parent reply other threads:[~2022-03-14 11:09 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 9:52 [PATCH v3 net-next 00/14] net: bridge: Multiple Spanning Trees Tobias Waldekranz
2022-03-14 9:52 ` [PATCH v3 net-next 01/14] net: bridge: mst: Multiple Spanning Tree (MST) mode Tobias Waldekranz
2022-03-14 10:37 ` Nikolay Aleksandrov
2022-03-14 11:09 ` Nikolay Aleksandrov [this message]
2022-03-14 12:31 ` kernel test robot
2022-03-14 16:43 ` kernel test robot
2022-03-14 9:52 ` [PATCH v3 net-next 02/14] net: bridge: mst: Allow changing a VLAN's MSTI Tobias Waldekranz
2022-03-14 10:45 ` Nikolay Aleksandrov
2022-03-14 9:52 ` [PATCH v3 net-next 03/14] net: bridge: mst: Support setting and reporting MST port states Tobias Waldekranz
2022-03-14 10:37 ` Nikolay Aleksandrov
2022-03-14 12:38 ` Tobias Waldekranz
2022-03-14 14:58 ` Vladimir Oltean
2022-03-14 15:42 ` Tobias Waldekranz
2022-03-14 9:52 ` [PATCH v3 net-next 04/14] net: bridge: mst: Notify switchdev drivers of MST mode changes Tobias Waldekranz
2022-03-14 9:52 ` [PATCH v3 net-next 05/14] net: bridge: mst: Notify switchdev drivers of VLAN MSTI migrations Tobias Waldekranz
2022-03-14 9:52 ` [PATCH v3 net-next 06/14] net: bridge: mst: Notify switchdev drivers of MST state changes Tobias Waldekranz
2022-03-14 9:52 ` [PATCH v3 net-next 07/14] net: bridge: mst: Add helper to map an MSTI to a VID set Tobias Waldekranz
2022-03-14 10:42 ` Nikolay Aleksandrov
2022-03-14 9:52 ` [PATCH v3 net-next 08/14] net: bridge: mst: Add helper to check if MST is enabled Tobias Waldekranz
2022-03-14 10:43 ` Nikolay Aleksandrov
2022-03-14 9:52 ` [PATCH v3 net-next 09/14] net: dsa: Validate hardware support for MST Tobias Waldekranz
2022-03-14 16:56 ` Vladimir Oltean
2022-03-14 17:55 ` Vladimir Oltean
2022-03-14 20:01 ` Tobias Waldekranz
2022-03-14 20:20 ` Vladimir Oltean
2022-03-14 22:13 ` Tobias Waldekranz
2022-03-14 17:51 ` Vladimir Oltean
2022-03-14 9:52 ` [PATCH v3 net-next 10/14] net: dsa: Pass VLAN MSTI migration notifications to driver Tobias Waldekranz
2022-03-14 17:07 ` Vladimir Oltean
2022-03-14 9:52 ` [PATCH v3 net-next 11/14] net: dsa: Handle MST state changes Tobias Waldekranz
2022-03-14 17:14 ` Vladimir Oltean
2022-03-14 9:52 ` [PATCH v3 net-next 12/14] net: dsa: mv88e6xxx: Disentangle STU from VTU Tobias Waldekranz
2022-03-14 9:52 ` [PATCH v3 net-next 13/14] net: dsa: mv88e6xxx: Export STU as devlink region Tobias Waldekranz
2022-03-14 9:52 ` [PATCH v3 net-next 14/14] net: dsa: mv88e6xxx: MST Offloading Tobias Waldekranz
2022-03-14 16:27 ` Vladimir Oltean
2022-03-14 21:57 ` Tobias Waldekranz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=037a8f48-29c5-ae45-b562-df15dbe6d163@blackwall.org \
--to=razor@blackwall.org \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=idosch@nvidia.com \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=matt@codeconstruct.com.au \
--cc=me@cooperlees.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=petrm@nvidia.com \
--cc=roopa@nvidia.com \
--cc=tobias@waldekranz.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®