mlxsw: spectrum: Add extack for VLAN enslavements
authorIdo Schimmel <idosch@mellanox.com>
Sun, 8 Oct 2017 09:57:55 +0000 (11:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Oct 2017 17:07:21 +0000 (10:07 -0700)
commitc1f2c6d025d365d961dcdf555ecf0f60066f38a3
treeb39c0d0bcf15f3d1aed780d79e9b0f1baf125e38
parentc9f766bc6ee0c0a0b01ac2c94610aa5dde7343ff
mlxsw: spectrum: Add extack for VLAN enslavements

Similar to physical ports, enslavement of VLAN devices can also fail.
Use extack to indicate why the enslavement failed.

$ ip link add link enp1s0np1 name enp1s0np1.10 type vlan id 10
$ ip link add name bond0 type bond mode 802.3ad
$ ip link set dev enp1s0np1.10 master bond0
Error: spectrum: VLAN devices only support bridge and VRF uppers.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c