• Petr Machata's avatar
    mlxsw: spectrum_router: Take router lock in router notifier handler · c353fb0d
    Petr Machata authored
    For notifications that the router needs to handle, router lock is taken.
    Further, at least to determine whether an event is related to a tunnel
    underlay, router lock also needs to be taken. Due to this, the router lock
    is always taken for each unhandled event, and also for some handled events,
    even if they are not related to underlay. Thus each event implies at least
    one router lock, sometimes two.
    
    Instead of deferring the locking to the leaf handlers, take the lock in the
    router notifier handler always. This simplifies thinking about the locking
    state, and in some cases saves one lock cycle.
    Signed-off-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>
    c353fb0d
spectrum_router.c 294 KB