mlxsw: spectrum_router: Set FIB entry's type based on nexthop group
authorIdo Schimmel <idosch@nvidia.com>
Tue, 17 Nov 2020 17:47:00 +0000 (19:47 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Nov 2020 19:51:18 +0000 (11:51 -0800)
commitc0351b7c25ffd52408c1297fbe552f185d5aac3f
tree8f12ab8c9412afed019544ad0913b7be30384ae4
parent5c9a3b24518c8b5c446b247ccd0e8a98f65abf2a
mlxsw: spectrum_router: Set FIB entry's type based on nexthop group

The previous patch associated a nexthop group with the FIB entry before
the entry's type is determined.

Make use of the nexthop group when determining the entry's type instead
of relying on helpers that assume that the nexthop info is not a nexthop
object (i.e., 'struct nexthop').

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