]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Allow querying VR ID based on table ID
authorIdo Schimmel <idosch@mellanox.com>
Wed, 17 Oct 2018 08:53:08 +0000 (08:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Oct 2018 00:45:07 +0000 (17:45 -0700)
commitb39f7c9aa6fb3163f5ffd38588031456bfec5cbd
treeb17af37d8b5fcad1a4b94528f658f0bbc82ce872
parenta7560c010d79271f6654bfe6cf93b42c33aa1dc5
mlxsw: spectrum_router: Allow querying VR ID based on table ID

In the device, different VRFs (routing tables) are represented using
different virtual routers (VRs) and thus the kernel's table IDs are
mapped to VR IDs.

Allow internal users of the IP router to query the VR ID based on a
kernel table ID.

This is needed - for example - when configuring the underlay VR where
VxLAN encapsulated packets will undergo an L3 lookup. In this case, the
kernel's table ID is derived from the VxLAN device's configuration.

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