• Amit Cohen's avatar
    mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2 · bf677bd2
    Amit Cohen authored
    Currently only one EtherType can be configured for pushing in tunnels
    because EtherType is configured using SPVID.et_vlan for tunnel port.
    
    This behavior is forbidden by comparing mlxsw_sp_nve_config struct for
    each new tunnel, the struct contains 'ethertype' field which means that
    only one EtherType is legal at any given time. Remove 'ethertype' field to
    allow creating VxLAN devices with different bridges.
    
    To allow using several types of VxLAN bridges at the same time, the
    EtherType should be determined at the egress port. This behavior is
    achieved by setting SPVID to decide which EtherType to push at egress and
    for each local_port which is member in 802.1ad bridge, set SPEVET.et_vlan
    to ether_type1 (i.e., 0x88A8).
    
    Use switchdev_ops->init() to set different mlxsw_sp_bridge_ops for
    different ASICs in order to be able to split the behavior when port joins /
    leaves an 802.1ad bridge in different ASICs.
    Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    bf677bd2
spectrum_nve_vxlan.c 13.1 KB