]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Explicitly Associate RIFs with VRs
authorIdo Schimmel <idosch@mellanox.com>
Fri, 10 Mar 2017 07:53:42 +0000 (08:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 17:36:06 +0000 (09:36 -0800)
commit561dc0f23e9014abfb6b398d952d51191498dd79
treebae079fd071ce13ffd4f15c5169bc23e2eae6d62
parentbe12ab40b0bd46a0f46bb995d87e8f5abdafceca
mlxsw: spectrum_router: Explicitly Associate RIFs with VRs

Up until now we implicitly associated all the router interfaces (RIFs)
with the first virtual router (VR). This must be changed in order to
enable VRF offload. Otherwise, a packet received via a VRF slave would
do a FIB lookup in the same table used by other VRFs.

Instead, bind the RIF to a VR according to the table where FIB lookup
should be performed for packets received via the RIF.

Currently, we only care about the MAIN and LOCAL tables (which we squash
together).

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