• Yotam Gigi's avatar
    mlxsw: spectrum_switchdev: Support bridge mrouter notifications · 593bc28a
    Yotam Gigi authored
    Support the SWITCHDEV_ATTR_ID_BRIDGE_MROUTER port attribute switchdev
    notification.
    
    To do that, add the mrouter flag to struct mlxsw_sp_bridge_device, which
    indicates whether the bridge device was set to be mrouter port. This field
    is set when:
     - A new bridge is created, where the value is taken from the kernel
       bridge value.
     - A switchdev SWITCHDEV_ATTR_ID_BRIDGE_MROUTER notification is sent.
    
    In addition, change the bridge MID entries to include the router port when
    the bridge device is configured to be mrouter port. The MID entries are
    updated in the following cases:
     - When a new MID entry is created, update the router port according to the
       bridge mrouter state.
     - When a SWITCHDEV_ATTR_ID_BRIDGE_MROUTER notification is sent, update all
       the bridge's MID entries.
    
    This is aligned with the case where a bridge slave is configured to be
    mrouter port.
    Signed-off-by: default avatarYotam Gigi <yotamg@mellanox.com>
    Reviewed-by: default avatarNogah Frankel <nogahf@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    593bc28a
spectrum_switchdev.c 63.9 KB