• Amit Cohen's avatar
    mlxsw: spectrum_fid: Configure layer 3 egress VID classification · d4b464d2
    Amit Cohen authored
    
    
    After routing, the device always consults a table that determines the
    packet's egress VID based on {egress RIF, egress local port}. In the
    unified bridge model, it is up to software to maintain this table via REIV
    register.
    
    The table needs to be updated in the following flows:
    1. When a RIF is set on a FID, need to iterate over the FID's {Port, VID}
       list and issue REIV write to map the {RIF, Port} to the given VID.
    2. When a {Port, VID} is mapped to a FID and the FID already has a RIF,
       need to issue REIV write with a single record to map the {RIF, Port}
       to the given VID.
    
    REIV register supports a simultaneous update of 256 ports, so use this
    capability for the first flow.
    
    Handle the two above mentioned flows.
    
    Add mlxsw_sp_fid_evid_map() function to handle egress VID classification
    for both unicast and multicast. Layer 2 multicast configuration is already
    done in the driver, just move it to the new function.
    Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d4b464d2
spectrum_fid.c 45.5 KB