mlxsw: spectrum_router: Create loopback RIF during initialization
authorIdo Schimmel <idosch@nvidia.com>
Mon, 23 Nov 2020 07:12:21 +0000 (09:12 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 24 Nov 2020 20:14:55 +0000 (12:14 -0800)
commit07c78536efc5ccb90d55fd8c52bc785caffeb520
tree9d19c00d44ef080e7106500f5fe88e0c3a67fb91
parent23c01ed3b0def0e28cca141d11d9e35a7f7acf2f
mlxsw: spectrum_router: Create loopback RIF during initialization

Up until now RIFs (router interfaces) were created on demand (e.g.,
when an IP address was added to a netdev). However, sometimes the device
needs to be provided with a RIF when one might not be available.

For example, adjacency entries that drop packets need to be programmed
with an egress RIF despite the RIF not being used to forward packets.

Create such a RIF during initialization so that it could be used later
on to support blackhole nexthops.

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
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h