]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mlxsw: spectrum_router: Do not unconditionally clear route offload indication
authorIdo Schimmel <idosch@mellanox.com>
Fri, 16 Feb 2018 23:30:44 +0000 (00:30 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 15 Mar 2018 13:28:14 +0000 (08:28 -0500)
commitb9138f632a623dc67c70476f86ce40954e001d1e
tree1b44e1b3b8240ae30c304240e3cb416360171de5
parent360a6fdd3b9653d39fd578d3e60a8b68341b1d58
mlxsw: spectrum_router: Do not unconditionally clear route offload indication

BugLink: http://bugs.launchpad.net/bugs/1755179
[ Upstream commit d1c95af366961101819f07e3c64d44f3be7f0367 ]

When mlxsw replaces (or deletes) a route it removes the offload
indication from the replaced route. This is problematic for IPv4 routes,
as the offload indication is stored in the fib_info which is usually
shared between multiple routes.

Instead of unconditionally clearing the offload indication, only clear
it if no other route is using the fib_info.

Fixes: 3984d1a89fe7 ("mlxsw: spectrum_router: Provide offload indication using nexthop flags")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Alexander Petrovskiy <alexpe@mellanox.com>
Tested-by: Alexander Petrovskiy <alexpe@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c