Re: [RFC net-next] net: dsa: add support for MC_DISABLED attribute

Ido Schimmel
2019-07-07T10:28:51Z

On Fri, Jul 05, 2019 at 12:01:49PM -0400, Vivien Didelot wrote:
> Hi Ido,
>
> On Sun, 23 Jun 2019 07:09:52 +0000, Ido Schimmel <idosch@mellanox.com> wrote:
> > > Russell, Ido, Florian, so far I understand that a multicast-unaware
> > > bridge must flood unknown traffic everywhere (CPU included);
> > > and a multicast-aware bridge must only flood its ports if their
> > > mcast_flood is on, and known traffic targeting the bridge must be
> > > offloaded accordingly. Do you guys agree with this?
> >
> > When multicast snooping is enabled unregistered multicast traffic should
> > only be flooded to mrouter ports.
>
> I've figured out that this is what I need to prevent the flooding of undesired
> multicast traffic to the CPU port of the switch. The bridge itself has a
> multicast_router attribute which can be disabled, that is when I should drop
> unknown multicast traffic.
>
> However with SWITCHDEV_ATTR_ID_BRIDGE_MROUTER implemented, this
> attribute is always called with .mrouter=0, regardless the value of
> /sys/class/net/br0/bridge/multicast_router. Do I miss something here?

Hi Vivien,

I just checked this and it seems to work as expected:

# echo 2 > /sys/class/net/br0/bridge/multicast_router

We get a notification with mrouter=1 to mlxsw

# echo 0 > /sys/class/net/br0/bridge/multicast_router

We get a notification with mrouter=0 to mlxsw