• Amit Cohen's avatar
    selftests: mlxsw: Add egress VID classification test · 1623d571
    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, for each FID's {Port, VID} mapping, a new
       {RIF, Port}->VID mapping should be created.
    2. When a {Port, VID} is mapped to a FID and the FID already has a RIF,
       a new {RIF, Port}->VID mapping should be created.
    
    Add a test to verify that packets get the correct VID after routing,
    regardless of the order of the configuration.
    
     # ./egress_vid_classification.sh
     TEST: Add RIF for existing {port, VID}->FID mapping                 [ OK ]
     TEST: Add {port, VID}->FID mapping for FID with a RIF               [ OK ]
    Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    1623d571
egress_vid_classification.sh 6.61 KB