diff options
author | Brian Haley <brian.haley@hp.com> | 2008-11-04 20:51:14 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-11-06 00:49:37 -0500 |
commit | 305d552accae6afb859c493ebc7d98ca3371dae2 (patch) | |
tree | aa1230b1a6cf85ceb36d3e8a8a155ef4348523b6 /drivers/net/bonding/bonding.h | |
parent | 61c9eaf90081cbe6dc4f389e0056bff76eca19ec (diff) |
bonding: send IPv6 neighbor advertisement on failover
This patch adds better IPv6 failover support for bonding devices,
especially when in active-backup mode and there are only IPv6 addresses
configured, as reported by Alex Sidorenko.
- Creates a new file, net/drivers/bonding/bond_ipv6.c, for the
IPv6-specific routines. Both regular bonds and VLANs over bonds
are supported.
- Adds a new tunable, num_unsol_na, to limit the number of unsolicited
IPv6 Neighbor Advertisements that are sent on a failover event.
Default is 1.
- Creates two new IPv6 neighbor discovery functions:
ndisc_build_skb()
ndisc_send_skb()
These were required to support VLANs since we have to be able to
add the VLAN id to the skb since ndisc_send_na() and friends
shouldn't be asked to do this. These two routines are basically
__ndisc_send() split into two pieces, in a slightly different order.
- Updates Documentation/networking/bonding.txt and bumps the rev of bond
support to 3.4.0.
On failover, this new code will generate one packet:
- An unsolicited IPv6 Neighbor Advertisement, which helps the switch
learn that the address has moved to the new slave.
Testing has shown that sending just the NA results in pretty good
behavior when in active-back mode, I saw no lost ping packets for example.
Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r-- | drivers/net/bonding/bonding.h | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index ffb668dd6d3b..0491c7c2645b 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -19,16 +19,19 @@ | |||
19 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
20 | #include <linux/if_bonding.h> | 20 | #include <linux/if_bonding.h> |
21 | #include <linux/kobject.h> | 21 | #include <linux/kobject.h> |
22 | #include <linux/in6.h> | ||
22 | #include "bond_3ad.h" | 23 | #include "bond_3ad.h" |
23 | #include "bond_alb.h" | 24 | #include "bond_alb.h" |
24 | 25 | ||
25 | #define DRV_VERSION "3.3.0" | 26 | #define DRV_VERSION "3.4.0" |
26 | #define DRV_RELDATE "June 10, 2008" | 27 | #define DRV_RELDATE "October 7, 2008" |
27 | #define DRV_NAME "bonding" | 28 | #define DRV_NAME "bonding" |
28 | #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" | 29 | #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" |
29 | 30 | ||
30 | #define BOND_MAX_ARP_TARGETS 16 | 31 | #define BOND_MAX_ARP_TARGETS 16 |
31 | 32 | ||
33 | extern struct list_head bond_dev_list; | ||
34 | |||
32 | #ifdef BONDING_DEBUG | 35 | #ifdef BONDING_DEBUG |
33 | #define dprintk(fmt, args...) \ | 36 | #define dprintk(fmt, args...) \ |
34 | printk(KERN_DEBUG \ | 37 | printk(KERN_DEBUG \ |
@@ -126,6 +129,7 @@ struct bond_params { | |||
126 | int xmit_policy; | 129 | int xmit_policy; |
127 | int miimon; | 130 | int miimon; |
128 | int num_grat_arp; | 131 | int num_grat_arp; |
132 | int num_unsol_na; | ||
129 | int arp_interval; | 133 | int arp_interval; |
130 | int arp_validate; | 134 | int arp_validate; |
131 | int use_carrier; | 135 | int use_carrier; |
@@ -148,6 +152,9 @@ struct vlan_entry { | |||
148 | struct list_head vlan_list; | 152 | struct list_head vlan_list; |
149 | __be32 vlan_ip; | 153 | __be32 vlan_ip; |
150 | unsigned short vlan_id; | 154 | unsigned short vlan_id; |
155 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
156 | struct in6_addr vlan_ipv6; | ||
157 | #endif | ||
151 | }; | 158 | }; |
152 | 159 | ||
153 | struct slave { | 160 | struct slave { |
@@ -195,6 +202,7 @@ struct bonding { | |||
195 | rwlock_t curr_slave_lock; | 202 | rwlock_t curr_slave_lock; |
196 | s8 kill_timers; | 203 | s8 kill_timers; |
197 | s8 send_grat_arp; | 204 | s8 send_grat_arp; |
205 | s8 send_unsol_na; | ||
198 | s8 setup_by_slave; | 206 | s8 setup_by_slave; |
199 | struct net_device_stats stats; | 207 | struct net_device_stats stats; |
200 | #ifdef CONFIG_PROC_FS | 208 | #ifdef CONFIG_PROC_FS |
@@ -218,6 +226,9 @@ struct bonding { | |||
218 | struct delayed_work arp_work; | 226 | struct delayed_work arp_work; |
219 | struct delayed_work alb_work; | 227 | struct delayed_work alb_work; |
220 | struct delayed_work ad_work; | 228 | struct delayed_work ad_work; |
229 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
230 | struct in6_addr master_ipv6; | ||
231 | #endif | ||
221 | }; | 232 | }; |
222 | 233 | ||
223 | /** | 234 | /** |
@@ -341,5 +352,24 @@ extern struct bond_parm_tbl xmit_hashtype_tbl[]; | |||
341 | extern struct bond_parm_tbl arp_validate_tbl[]; | 352 | extern struct bond_parm_tbl arp_validate_tbl[]; |
342 | extern struct bond_parm_tbl fail_over_mac_tbl[]; | 353 | extern struct bond_parm_tbl fail_over_mac_tbl[]; |
343 | 354 | ||
355 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
356 | void bond_send_unsolicited_na(struct bonding *bond); | ||
357 | void bond_register_ipv6_notifier(void); | ||
358 | void bond_unregister_ipv6_notifier(void); | ||
359 | #else | ||
360 | static inline void bond_send_unsolicited_na(struct bonding *bond) | ||
361 | { | ||
362 | return; | ||
363 | } | ||
364 | static inline void bond_register_ipv6_notifier(void) | ||
365 | { | ||
366 | return; | ||
367 | } | ||
368 | static inline void bond_unregister_ipv6_notifier(void) | ||
369 | { | ||
370 | return; | ||
371 | } | ||
372 | #endif | ||
373 | |||
344 | #endif /* _LINUX_BONDING_H */ | 374 | #endif /* _LINUX_BONDING_H */ |
345 | 375 | ||