• I
    mlxsw: spectrum_router: Implement common RIF core · e4f3c1c1
    Ido Schimmel 提交于
    The mlxsw driver currently implements three types of RIFs. VLAN and FID
    RIFs for L3 interfaces on top of VLAN-aware and VLAN-unaware bridges
    (respectively) and Subport RIFs for all other L3 interfaces.
    
    All the RIF types follow a common configuration procedure, which only
    differs in the type-specific bits. The patch exploits this fact and
    consolidates the common code paths, thereby simplifying the code and
    making it more extensible.
    
    This work also prepares the driver for use with future ASICs, where the
    range of the Subport RIFs will be extended and their configuration
    modified accordingly. By merely implementing a new RIF operations and
    selecting it during initialization, the same driver could be re-used.
    Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: NJiri Pirko <jiri@mellanox.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    e4f3c1c1
spectrum_router.c 99.6 KB