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 <[email protected]>
> > ---
>
> [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