• Ido Schimmel's avatar
    mlxsw: spectrum_router: Refactor virtual router handling · 76610ebb
    Ido Schimmel authored
    A virtual router (VR) is an entity within the device to which routing
    tables and interfaces can be bound to. It can be used to implement VRFs.
    
    In the initial implementation we associated the VR with a specific
    protocol (e.g., IPv4) and an LPM tree. However, this isn't really
    accurate, as the same VR can be used for both IPv4 and IPv6 traffic, by
    binding a different LPM tree to a {VR, Proto} pair.
    
    This patch aims to restructure the VR code according to the above logic,
    so that VRs are more accurately represented by the driver's data
    structures. The main motivation behind this change is to prepare the
    driver for VRF offload.
    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>
    76610ebb
spectrum.h 19.8 KB