summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2017-03-10 08:53:42 +0100
committerDavid S. Miller <davem@davemloft.net>2017-03-10 09:36:06 -0800
commit6913229eea27e63df086f55372e52021727fd0a7 (patch)
treebae079fd071ce13ffd4f15c5169bc23e2eae6d62 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h
parent76610ebbde1883527cf5afa8708a5b0599439a28 (diff)
downloadop-kernel-dev-6913229eea27e63df086f55372e52021727fd0a7.zip
op-kernel-dev-6913229eea27e63df086f55372e52021727fd0a7.tar.gz
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index 5a7ffa1..3bc1b09 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -187,6 +187,7 @@ struct mlxsw_sp_fib;
struct mlxsw_sp_vr {
u16 id; /* virtual router ID */
u32 tb_id; /* kernel fib table id */
+ unsigned int rif_count;
struct mlxsw_sp_fib *fib4;
};
OpenPOWER on IntegriCloud