Skip to content
  • Ido Schimmel's avatar
    mlxsw: spectrum: Enable VxLAN enslavement to VLAN-aware bridges · d70e42b2
    Ido Schimmel authored
    Commit 1c30d183
    
     ("mlxsw: spectrum: Enable VxLAN enslavement to
    bridges") enabled the enslavement of VxLAN devices to bridges that have
    mlxsw ports (or their upper) as slaves. This patch extends mlxsw to also
    support VLAN-aware bridges.
    
    The patch is similar in nature to mentioned commit, but there is one
    major difference. With VLAN-aware bridges, the VxLAN device's VNI is
    mapped to the VLAN that is configured as PVID and egress untagged on the
    bridge port.
    
    Therefore, the driver is extended to listen to VLAN configuration on
    VxLAN devices of interest and enable / disable NVE encapsulation on the
    corresponding 802.1Q FIDs.
    
    To prevent ambiguity, the driver makes sure that a given VLAN is not
    configured as PVID and egress untagged on multiple VxLAN devices. This
    sanitization takes place both when a port is enslaved to a bridge with
    existing VxLAN devices and when a VLAN is added to / removed from a
    VxLAN device of interest.
    
    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>
    d70e42b2