team: Use extack to report enslavement failures
authorIdo Schimmel <idosch@mellanox.com>
Tue, 27 Feb 2018 15:38:08 +0000 (17:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Feb 2018 16:01:30 +0000 (11:01 -0500)
commit44d15d930bb8463d10b05bbed45e881e5055495a
treec084589f3bc34566e98711b66b8dbe168ee2fe19
parentfb66cb0775609852b812c9bc2bd1589374317410
team: Use extack to report enslavement failures

Use extack inside team's enslavement function and also propagate it to
the netdevice notifier to allow enslaved ports to report the failure
reason. Example:

$ teamd -t team0 -d -c '{"runner": {"name": "lacp"}}'
$ ip link set dev lo master team0
Error: Loopback device can't be added as a team port.

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