]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mlxsw: spectrum_router: Correctly remove nexthop groups
authorIdo Schimmel <idosch@mellanox.com>
Fri, 23 Dec 2016 08:32:50 +0000 (09:32 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Dec 2016 17:31:19 +0000 (12:31 -0500)
commit58312125da5806308bd69e075fedae30f8cf7794
treef82056ea3aae09a9a74e3960b5ced4dcfd901527
parent93a87e5e794fb71a51f97fbde6c0010680b62d70
mlxsw: spectrum_router: Correctly remove nexthop groups

At the end of the nexthop initialization process we determine whether
the nexthop should be offloaded or not based on the NUD state of the
neighbour representing it. After all the nexthops were initialized we
refresh the nexthop group and potentially offload it to the device, in
case some of the nexthops were resolved.

Make the destruction of a nexthop group symmetric with its creation by
marking all nexthops as invalid and then refresh the nexthop group to
make sure it was removed from the device's tables.

Fixes: b2157149b0b0 ("mlxsw: spectrum_router: Add the nexthop neigh activity update")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
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