]> git.baikalelectronics.ru Git - kernel.git/commit
net: core: dev: Attach extack to NETDEV_PRE_UP
authorPetr Machata <petrm@mellanox.com>
Thu, 6 Dec 2018 17:05:47 +0000 (17:05 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Dec 2018 21:26:07 +0000 (13:26 -0800)
commit523a4a13f2ad13b5911796e499d2d6f16a814b7b
tree1c995f3a70442b748ee8a9231f8047296ac9d7d9
parent26e53c6fda758fd457f5119b7dbfef61c918fef8
net: core: dev: Attach extack to NETDEV_PRE_UP

Drivers may need to validate configuration of a device that's about to
be upped. Should the validation fail, there's currently no way to
communicate details of the failure to the user, beyond an error number.

To mend that, change __dev_open() to take an extack argument and pass it
from __dev_change_flags() and dev_open(), where it was propagated in the
previous patches.

Change __dev_open() to call call_netdevice_notifiers_extack() so that
the passed-in extack is attached to the NETDEV_PRE_UP notifier.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c