• Ido Schimmel's avatar
    mlxsw: spectrum_router: Store NVE decapsulation configuration in router · 8e18d85e
    Ido Schimmel authored
    When a host route is added, the driver checks if the route needs to be
    promoted to perform NVE decapsulation based on the current NVE
    configuration. If so, the index of the decapsulation entry is retrieved
    and associated with the route.
    
    Currently, this information is stored in the NVE module which the router
    module consults. Since the information is protected under RTNL and since
    route insertion happens with RTNL held, there is no problem to retrieve
    the information from the NVE module.
    
    However, this is going to change and route insertion will no longer
    happen under RTNL. Instead, a dedicated lock will be introduced for the
    router module.
    
    Therefore, store this information in the router module and change the
    router module to consult this copy.
    
    The validity of the information is set / cleared whenever an NVE tunnel
    is initialized / de-initialized. When this happens the NVE module calls
    into the router module to promote / demote the relevant host route.
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8e18d85e
spectrum_router.h 5.63 KB