• Ido Schimmel's avatar
    mlxsw: spectrum: Enable VxLAN enslavement to bridges · 1c30d183
    Ido Schimmel authored
    Enslavement of VxLAN devices to offloaded bridges was never forbidden by
    mlxsw, but this patch makes sure the required configuration is performed
    in order to allow VxLAN encapsulation and decapsulation to take place in
    the device.
    
    The patch handles both the case where a VxLAN device is enslaved to an
    already offloaded bridge and the case where the first mlxsw port is
    enslaved to a bridge that already has VxLAN device configured.
    
    Invalid configurations are sanitized and an error string is returned via
    extack.
    
    Since encapsulation and decapsulation do not occur when the VxLAN device
    is down, the driver makes sure to enable / disable these functionalities
    based on NETDEV_PRE_UP and NETDEV_DOWN events.
    
    Note that NETDEV_PRE_UP is used in favor of NETDEV_UP, as the former
    allows to veto the operation, if necessary.
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Reviewed-by: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1c30d183
spectrum.h 29 KB