]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mlxsw: spectrum: Associate PVID vPort with appropriate netdev
authorIdo Schimmel <idosch@mellanox.com>
Fri, 10 Mar 2017 07:53:36 +0000 (08:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 17:36:06 +0000 (09:36 -0800)
commit186962ebb7ecd74d305cf167e99bf1885b89ea8c
tree7aa01e643ce18371f21a0efece6e1dbf186f3845
parent1f88061ee409f5ec3d3451fc3235965aa3789af1
mlxsw: spectrum: Associate PVID vPort with appropriate netdev

When a VLAN device is configured on top of a LAG device (f.e.,
bond0.10), a vPort is created on top of each of the LAG's slaves and its
'dev' pointer is set to the VLAN device.

This is in contrast to the implicit PVID vPort (representing 'bond0'),
whose 'dev' pointer keeps pointing to the port netdev itself (f.e.,
'sw1p1').

Make both cases consistent by setting their 'dev' pointer to the actual
netdev they represent. Either the LAG device itself (in the case of the
PVID vPort) or the VLAN device on top of it.

This will later allow us to more easily understand for which netdev we
should create the router interface (RIF) upon enslavement to a VRF
master.

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.c