[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190217220439.zqu7dz7kfukssrlz@shell.armlinux.org.uk>
Date: Sun, 17 Feb 2019 22:04:40 +0000
From: Russell King - ARM Linux admin <linux@...linux.org.uk>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/3] net: dsa: add support for bridge flags
On Sun, Feb 17, 2019 at 01:37:19PM -0800, Florian Fainelli wrote:
>
>
> On 2/17/2019 6:25 AM, Russell King wrote:
> > The Linux bridge implementation allows various properties of the bridge
> > to be controlled, such as flooding unknown unicast and multicast frames.
> > This patch adds the necessary DSA infrastructure to allow the Linux
> > bridge support to control these properties for DSA switches.
> >
> > We implement this by providing two new methods: one to get the switch-
> > wide support bitmask, and another to set the properties.
> >
> > Signed-off-by: Russell King <rmk+kernel@...linux.org.uk>
> > ---
>
> [snip]
>
> >
> > +int dsa_port_bridge_flags(const struct dsa_port *dp, unsigned long flags,
> > + struct switchdev_trans *trans)
> > +{
> > + struct dsa_switch *ds = dp->ds;
> > + int port = dp->index;
> > +
> > + if (switchdev_trans_ph_prepare(trans))
> > + return ds->ops->port_bridge_flags ? 0 : -EOPNOTSUPP;
> > +
> > + if (ds->ops->port_bridge_flags)
> > + ds->ops->port_bridge_flags(ds, port, flags);
>
> If you have a switch fabric with multiple switches, it seems to me that
> you also need to make sure that the DSA and CPU ports will have
> compatible flooding attribute, so just like the port_vlan_add()
> callback, you probably need to make this a switch fabric-wide event and
> use a notifier here. At least the DSA ports need to have MC flooding
> turned on for an user port to also have MC flooding working.
mv88e6xxx already today detects CPU and DSA ports and sets unicast
and multicast flooding for these ports - see
mv88e6xxx_setup_egress_floods():
/* Upstream ports flood frames with unknown unicast or multicast DA */
flood = dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port);
if (chip->info->ops->port_set_egress_floods)
return chip->info->ops->port_set_egress_floods(chip, port,
flood, flood);
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
Powered by blists - more mailing lists