mlxsw: spectrum_router: Support RIF without device
authorNir Dotan <nird@mellanox.com>
Sun, 20 Jan 2019 06:50:49 +0000 (06:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 20 Jan 2019 19:12:57 +0000 (11:12 -0800)
commit73b8f493c8863711989174193cbd67b34ac1a350
tree4f71b88b1e7a405a244f7fa8fe19807e49be1a29
parent33c04afe4d985d58d16c4af727bceb91715d03da
mlxsw: spectrum_router: Support RIF without device

Spectrum-2 underlay RIF is merely an auxiliary RIF that points to the
virtual router used for encapsulated packets lookup. It exists only when
its overlay RIF exists but may be shared with other overlay RIFs.
Hence it is undesired to mark any device as related to it.

Therefore allow usage of NULL device when allocating RIF.

Signed-off-by: Nir Dotan <nird@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c