]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
mlxsw: spectrum_router: Return extack message on abort due to fib rules
authorDavid Ahern <dsahern@gmail.com>
Sat, 28 Oct 2017 00:37:14 +0000 (17:37 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Nov 2017 02:50:43 +0000 (11:50 +0900)
commit1f279233affe115dd3f65c89716a4f4315bb4cfe
tree72a78c64985b30034f4673b7c3f649acdac2a604
parent6c31e5a91fde2e718e59c8a627c56451f88be54c
mlxsw: spectrum_router: Return extack message on abort due to fib rules

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: David Ahern <dsahern@gmail.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c