aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorIan Campbell <Ian.Campbell@citrix.com>2010-05-25 20:09:42 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-31 03:27:44 -0400
commit06c4648d46d1b757d6b9591a86810be79818b60c (patch)
tree96f6e09a23071157d5b446853294b4564155ffee /include/linux
parent3f8dc2362fd43a0adee2f6f05bf1ac4d619675b6 (diff)
arp_notify: allow drivers to explicitly request a notification event.
Currently such notifications are only generated when the device comes up or the address changes. However one use case for these notifications is to enable faster network recovery after a virtual machine migration (by causing switches to relearn their MAC tables). A migration appears to the network stack as a temporary loss of carrier and therefore does not trigger either of the current conditions. Rather than adding carrier up as a trigger (which can cause issues when interfaces a flapping) simply add an interface which the driver can use to explicitly trigger the notification. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David S. Miller <davem@davemloft.net> Cc: netdev@vger.kernel.org Cc: stable@kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/linux/notifier.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 40291f37502..a24916156f4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1772,6 +1772,8 @@ extern void netif_carrier_on(struct net_device *dev);
1772 1772
1773extern void netif_carrier_off(struct net_device *dev); 1773extern void netif_carrier_off(struct net_device *dev);
1774 1774
1775extern void netif_notify_peers(struct net_device *dev);
1776
1775/** 1777/**
1776 * netif_dormant_on - mark device as dormant. 1778 * netif_dormant_on - mark device as dormant.
1777 * @dev: network device 1779 * @dev: network device
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 540703b555c..22c2abb6197 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -210,6 +210,7 @@ static inline int notifier_to_errno(int ret)
210#define NETDEV_POST_INIT 0x0010 210#define NETDEV_POST_INIT 0x0010
211#define NETDEV_UNREGISTER_BATCH 0x0011 211#define NETDEV_UNREGISTER_BATCH 0x0011
212#define NETDEV_BONDING_DESLAVE 0x0012 212#define NETDEV_BONDING_DESLAVE 0x0012
213#define NETDEV_NOTIFY_PEERS 0x0012
213 214
214#define SYS_DOWN 0x0001 /* Notify of system down */ 215#define SYS_DOWN 0x0001 /* Notify of system down */
215#define SYS_RESTART SYS_DOWN 216#define SYS_RESTART SYS_DOWN