• Ido Schimmel's avatar
    mlxsw: spectrum: Set port's mode according to FID mappings · 4aafc368
    Ido Schimmel authored
    We currently transition the port to "Virtual mode" upon the creation of
    its first VLAN upper, as we need to classify incoming packets to a FID
    using {Port, VID} and not only the VID.
    
    However, it's more appropriate to transition the port to this mode when
    the {Port, VID} are actually mapped to a FID. Either during the
    enslavement of the VLAN upper to a VLAN-unaware bridge or the
    configuration of a router port.
    
    Do this change now in preparation for the introduction of the FID core,
    where this operation will be encapsulated.
    
    To prevent regressions, this patch also explicitly configures an OVS
    slave to "Virtual mode". Otherwise, a packet that didn't hit an ACL rule
    could be classified to an existing FID based on a global VID-to-FID
    mapping, thus not incurring a FID mis-classification, which would
    otherwise trap the packet to the CPU to be processed by the OVS daemon.
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4aafc368
spectrum_switchdev.c 40.2 KB