]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mlxsw: spectrum_router: Refactor virtual router handling
authorIdo Schimmel <idosch@mellanox.com>
Fri, 10 Mar 2017 07:53:41 +0000 (08:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 17:36:06 +0000 (09:36 -0800)
commit76610ebbde1883527cf5afa8708a5b0599439a28
tree9350d50a57f6ef120241239e09d8c15982059e45
parent382dbb40145076f3a023992117ddaaae1ced5af8
mlxsw: spectrum_router: Refactor virtual router handling

A virtual router (VR) is an entity within the device to which routing
tables and interfaces can be bound to. It can be used to implement VRFs.

In the initial implementation we associated the VR with a specific
protocol (e.g., IPv4) and an LPM tree. However, this isn't really
accurate, as the same VR can be used for both IPv4 and IPv6 traffic, by
binding a different LPM tree to a {VR, Proto} pair.

This patch aims to restructure the VR code according to the above logic,
so that VRs are more accurately represented by the driver's data
structures. The main motivation behind this change is to prepare the
driver for VRF offload.

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