diff options
author | Patrick McHardy <kaber@trash.net> | 2010-02-26 01:34:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-27 05:43:40 -0500 |
commit | bd38081160bb3d036db98472e537b6a7dd4da51a (patch) | |
tree | 26af1cae5e2dda3269da6f812586e93954582d54 /include/linux/netdevice.h | |
parent | a2835763e130c343ace5320c20d33c281e7097b7 (diff) |
dev: support deferring device flag change notifications
Split dev_change_flags() into two functions: __dev_change_flags() to
perform the actual changes and __dev_notify_flags() to invoke netdevice
notifiers. This will be used by rtnl_link to defer netlink notifications
until the device has been fully configured.
This changes ordering of some operations, in particular:
- netlink notifications are sent after all changes have been performed.
As a side effect this surpresses one unnecessary netlink message when
the IFF_UP and other flags are changed simultaneously.
- The NETDEV_UP/NETDEV_DOWN and NETDEV_CHANGE notifiers are invoked
after all changes have been performed. Their relative is unchanged.
- net_dmaengine_put() is invoked before the NETDEV_DOWN notifier instead
of afterwards. This should not make any difference since both RX and TX
are already shut down at this point.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1bfda90c2625..c79a88be7c33 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1587,7 +1587,9 @@ extern int dev_valid_name(const char *name); | |||
1587 | extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *); | 1587 | extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *); |
1588 | extern int dev_ethtool(struct net *net, struct ifreq *); | 1588 | extern int dev_ethtool(struct net *net, struct ifreq *); |
1589 | extern unsigned dev_get_flags(const struct net_device *); | 1589 | extern unsigned dev_get_flags(const struct net_device *); |
1590 | extern int __dev_change_flags(struct net_device *, unsigned int flags); | ||
1590 | extern int dev_change_flags(struct net_device *, unsigned); | 1591 | extern int dev_change_flags(struct net_device *, unsigned); |
1592 | extern void __dev_notify_flags(struct net_device *, unsigned int old_flags); | ||
1591 | extern int dev_change_name(struct net_device *, const char *); | 1593 | extern int dev_change_name(struct net_device *, const char *); |
1592 | extern int dev_set_alias(struct net_device *, const char *, size_t); | 1594 | extern int dev_set_alias(struct net_device *, const char *, size_t); |
1593 | extern int dev_change_net_namespace(struct net_device *, | 1595 | extern int dev_change_net_namespace(struct net_device *, |