mlxsw: spectrum_router: Add an indication if a nexthop group can be destroyed
authorIdo Schimmel <idosch@nvidia.com>
Tue, 17 Nov 2020 17:47:03 +0000 (19:47 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Nov 2020 19:51:18 +0000 (11:51 -0800)
commit2efca2bfba995e67a5372288a4d745fcefc6e8ce
treed8f2b7989f836b33c8ddb26b959ed4c536a06297
parenta9a711a3f78ba38badd32d1a06f844bc44863840
mlxsw: spectrum_router: Add an indication if a nexthop group can be destroyed

Currently, a nexthop group is destroyed when the last FIB entry is
detached from it.

When nexthop objects are supported, this can no longer be the case, as
the group is a separate object whose lifetime is managed by user space.

Add an indication if a nexthop group can be destroyed and always set it
to true for the existing IPv4 and IPv6 nexthop groups.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c