]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mlxsw: spectrum_router: Add support for VRFs
authorIdo Schimmel <idosch@mellanox.com>
Thu, 16 Mar 2017 08:08:18 +0000 (09:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Mar 2017 17:18:35 +0000 (10:18 -0700)
commit7179eb5acd59d64cb8bef2d8788af8e9647f6986
tree5b4008bafc6a9147442ab4f96c91d7e4e3964023
parent9db032bb1e8eed0721884c01a6c87f55f3d400fa
mlxsw: spectrum_router: Add support for VRFs

Allow port netdevs, LAG and VLAN devices stacked on top of these to be
enslaved to a VRF master device.

Upon enslavement, create a router interface (RIF) for the enslaved
netdev and associate it with a virtual router (VR) based on the VRF's
table ID.

If a RIF already exists for the netdev (f.e., due to the existence of an
IP address), then it's deleted and a new one is created with the
appropriate VR binding.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c