]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
mlxsw: spectrum_router: Set FIB entry's type after creating nexthop group
authorIdo Schimmel <idosch@nvidia.com>
Tue, 17 Nov 2020 17:46:59 +0000 (19:46 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Nov 2020 19:51:18 +0000 (11:51 -0800)
commit5c9a3b24518c8b5c446b247ccd0e8a98f65abf2a
tree7a0c7cda265ed93945daf96554575faeaf298168
parentc68e248d538b72a7643496afc99baca15604c38f
mlxsw: spectrum_router: Set FIB entry's type after creating nexthop group

Each FIB entry has a type (e.g., remote, local) that determines how the
entry is programmed to the device. In order to determine if the entry is
local (directly connected) or remote (has a gateway) the relevant FIB
info structures (e.g., 'struct fib_info') are checked.

When entries that use nexthop objects are supported, these checks will
need to be changed to take into account 'struct nexthop'.

Instead, first associate the entry with a nexthop group so that the next
patch could determine the entry's type based on the associated nexthop
group's type.

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