• I
    mlxsw: spectrum_router: Implement FIB offload in deferred work · 3057224e
    Ido Schimmel 提交于
    FIB offload is currently done in process context with RTNL held, but
    we're about to dump the FIB tables in RCU critical section, so we can no
    longer sleep.
    
    Instead, defer the operation to process context using deferred work. Make
    sure fib info isn't freed while the work is queued by taking a reference
    on it and releasing it after the operation is done.
    
    Deferring the operation is valid because the upper layers always assume
    the operation was successful. If it's not, then the driver-specific
    abort mechanism is called and all routed traffic is directed to slow
    path.
    
    The work items are submitted to an ordered workqueue to prevent a
    mismatch between the kernel's FIB table and the device's.
    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>
    3057224e
spectrum_router.c 55.6 KB