summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorAmerigo Wang2012-08-10 00:14:56 +0200
committerDavid S. Miller2012-08-14 23:28:23 +0200
commitee89bab14e857678f83a71ee99e575b0fdbb58d4 (patch)
tree7af6dd9ff8e565dd91fe6324861d432a0cef836d /net/core/dev.c
parenthyperv: Add comments for the extended buffer after RNDIS message (diff)
downloadkernel-qcow2-linux-ee89bab14e857678f83a71ee99e575b0fdbb58d4.tar.gz
kernel-qcow2-linux-ee89bab14e857678f83a71ee99e575b0fdbb58d4.tar.xz
kernel-qcow2-linux-ee89bab14e857678f83a71ee99e575b0fdbb58d4.zip
net: move and rename netif_notify_peers()
I believe net/core/dev.c is a better place for netif_notify_peers(), because other net event notify functions also stay in this file. And rename it to netdev_notify_peers(). Cc: David S. Miller <davem@davemloft.net> Cc: Ian Campbell <Ian.Campbell@citrix.com> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 1f06df8d10a3..5defcf940005 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1106,6 +1106,24 @@ void netdev_state_change(struct net_device *dev)
}
EXPORT_SYMBOL(netdev_state_change);
+/**
+ * netdev_notify_peers - notify network peers about existence of @dev
+ * @dev: network device
+ *
+ * Generate traffic such that interested network peers are aware of
+ * @dev, such as by generating a gratuitous ARP. This may be used when
+ * a device wants to inform the rest of the network about some sort of
+ * reconfiguration such as a failover event or virtual machine
+ * migration.
+ */
+void netdev_notify_peers(struct net_device *dev)
+{
+ rtnl_lock();
+ call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, dev);
+ rtnl_unlock();
+}
+EXPORT_SYMBOL(netdev_notify_peers);
+
int netdev_bonding_change(struct net_device *dev, unsigned long event)
{
return call_netdevice_notifiers(event, dev);