]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
mlxsw: spectrum_router: Fix failure caused by double fib removal from HW
authorJiri Pirko <jiri@mellanox.com>
Thu, 1 Sep 2016 08:37:40 +0000 (10:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Sep 2016 16:44:55 +0000 (09:44 -0700)
commit5b004412e2b7894105ea6043d380b7ab21f244ef
tree5140a78bb8f37a9c6e3703fa59416a8cf90bc199
parentc3804289c90c1c88e447991c4c06cff6acdee7bc
mlxsw: spectrum_router: Fix failure caused by double fib removal from HW

In mlxsw we squash tables 254 and 255 together into HW. Kernel adds/dels
/32 ip to/from both 254 and 255. On del path, that causes the same
prefix being removed twice. Fix this by introducing reference counting
for private mlxsw fib entries. That required a bit of code reshuffle.
Also put dev into fib entry key so the same prefix could be represented
once per every router interface.

Fixes: 61c503f976b5 ("mlxsw: spectrum_router: Implement fib4 add/del switchdev obj ops")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c