• David Ahern's avatar
    mlxsw: spectrum_router: Return extack message on abort due to fib rules · 1f279233
    David Ahern authored
    Adding a FIB rule on a spectrum platform silently aborts FIB offload:
        $ ip ru add pref 99 from all to 192.168.1.1 table 10
        $ dmesg -c
        [  623.144736] mlxsw_spectrum 0000:03:00.0: FIB abort triggered. Note that FIB entries are no longer being offloaded to this device.
    
    This patch reworks FIB rule handling to return a message to the user:
        $ ip ru add pref 99 from all to 8.8.8.8 table 11
        Error: spectrum: FIB rules not supported. Aborting offload.
    
    spectrum currently only checks whether the fib rule is a default rule or
    an l3mdev rule, both of which it knows how to handle. Any other it aborts
    FIB offload. Move the processing to check the rule type inline with the
    user request. If the rule is an unsupported one, then a work queue entry
    is used to abort the offload. Change the rule delete handling to just
    return since it does nothing at the moment.
    Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
    Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1f279233
spectrum_router.c 177 KB