OSDN Git Service

mlxsw: spectrum: Propagate extack further for bridge enslavements
authorIdo Schimmel <idosch@mellanox.com>
Sun, 8 Oct 2017 09:57:56 +0000 (11:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Oct 2017 17:07:21 +0000 (10:07 -0700)
commit9b63ef88d3a16d67afbe7916625289650e9f30d9
treed5f6331b5a44cce9f4dbeb24be2b99fa5698e67c
parentc1f2c6d025d365d961dcdf555ecf0f60066f38a3
mlxsw: spectrum: Propagate extack further for bridge enslavements

The code that actually takes care of bridge offload introduces a few
more non-trivial constraints with regards to bridge enslavements.
Propagate extack there to indicate the reason.

$ ip link add link enp1s0np1 name enp1s0np1.10 type vlan id 10
$ ip link add link enp1s0np1 name enp1s0np1.20 type vlan id 20
$ ip link add name br0 type bridge
$ ip link set dev enp1s0np1.10 master br0
$ ip link set dev enp1s0np1.20 master br0
Error: spectrum: Can not bridge VLAN uppers of the same port.

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