• Amit Cohen's avatar
    mlxsw: Add support for egress FID classification after decapsulation · 1b1c198c
    Amit Cohen authored
    As preparation for unified bridge model, add support for VNI->FID mapping
    via SVFA register.
    
    When performing VXLAN encapsulation, the VXLAN header needs to contain a
    VNI. This VNI is derived from the FID classification performed on
    ingress, through which the ingress RIF is also determined.
    
    Similarly, when performing VXLAN decapsulation, the FID of the packet
    needs to be determined. This FID is derived from VNI classification
    performed during decapsulation.
    
    In the old model, both entries (i.e., FID->VNI and VNI->FID) were
    configured via SFMR.vni.
    
    In the new model, where ingress is separated from egress, ingress
    configuration (VNI->FID) is performed via SVFA, while SFMR only
    configures egress (FID->VNI).
    
    Add 'vni' field to SVFA, add new mapping table - VNI to FID, add new
    pack() function for VNI mapping and edit the comment in SFMR.
    Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Reviewed-by: default avatarDanielle Ratson <danieller@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>
    1b1c198c
spectrum_fid.c 32.3 KB