]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitbf8d7eb38d686bf2a54af4db87e6765318cc2b4f
tree9d19c00d44ef080e7106500f5fe88e0c3a67fb91
parent22a53311b2b9e10aaad639ec064061a69aefaf34
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