summary refs log tree commit diff
path: root/net
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2017-04-30 19:47:14 +0300
committerDavid S. Miller <davem@davemloft.net>2017-05-01 11:47:58 -0400
commitb1e455260c9187b16dd4ebc428b817ebac322043 (patch)
tree7dbe01616807c5c4eb3523326f003c13692f5919 /net
parentcedf90c0cc1250cfb95905b61dc36b37ec9d5395 (diff)
downloadlinux-b1e455260c9187b16dd4ebc428b817ebac322043.tar.gz
mlxsw: spectrum_router: Simplify VRF enslavement
When a netdev is enslaved to a VRF master, its router interface (RIF)
needs to be destroyed (if exists) and a new one created using the
corresponding virtual router (VR).

>From the driver's perspective, the above is equivalent to an inetaddr
event sent for this netdev. Therefore, when a port netdev (or its
uppers) are enslaved to a VRF master, call the same function that
would've been called had a NETDEV_UP was sent for this netdev in the
inetaddr notification chain.

This patch also fixes a bug when a LAG netdev with an existing RIF is
enslaved to a VRF. Before this patch, each LAG port would drop the
reference on the RIF, but would re-join the same one (in the wrong VR)
soon after. With this patch, the corresponding RIF is first destroyed
and a new one is created using the correct VR.

Fixes: 7179eb5acd59 ("mlxsw: spectrum_router: Add support for VRFs")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions