mlxsw: spectrum_router: Add loopback accessors
authorPetr Machata <petrm@mellanox.com>
Sat, 2 Sep 2017 21:49:28 +0000 (23:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Sep 2017 03:23:26 +0000 (20:23 -0700)
commit92107cfb411f5371bee56d9a13d28ef8b40bbbbc
tree7fb23e4cfacee2909c22cc73655c6b1752627c02
parent86484de2c917b6ba5965ef2248d9966424932af4
mlxsw: spectrum_router: Add loopback accessors

struct mlxsw_sp_rif is a router-private structure, and therefore
everything related to it is as well: parameters, and derived RIF types
including loopbacks. IPIP module needs access to some details of
loopback interfaces, but exporting all the RIF shebang would create too
large an interface.

So instead export just the bare minimum necessary: accessors for RIF
index and underlay VRF ID.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-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_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h