diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/bonding/bonding.h | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r-- | drivers/net/bonding/bonding.h | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 68247714466f..257a7a4dfce9 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -23,15 +23,13 @@ | |||
23 | #include "bond_3ad.h" | 23 | #include "bond_3ad.h" |
24 | #include "bond_alb.h" | 24 | #include "bond_alb.h" |
25 | 25 | ||
26 | #define DRV_VERSION "3.5.0" | 26 | #define DRV_VERSION "3.6.0" |
27 | #define DRV_RELDATE "November 4, 2008" | 27 | #define DRV_RELDATE "September 26, 2009" |
28 | #define DRV_NAME "bonding" | 28 | #define DRV_NAME "bonding" |
29 | #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" | 29 | #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" |
30 | 30 | ||
31 | #define BOND_MAX_ARP_TARGETS 16 | 31 | #define BOND_MAX_ARP_TARGETS 16 |
32 | 32 | ||
33 | extern struct list_head bond_dev_list; | ||
34 | |||
35 | #define IS_UP(dev) \ | 33 | #define IS_UP(dev) \ |
36 | ((((dev)->flags & IFF_UP) == IFF_UP) && \ | 34 | ((((dev)->flags & IFF_UP) == IFF_UP) && \ |
37 | netif_running(dev) && \ | 35 | netif_running(dev) && \ |
@@ -131,6 +129,7 @@ struct bond_params { | |||
131 | int lacp_fast; | 129 | int lacp_fast; |
132 | int ad_select; | 130 | int ad_select; |
133 | char primary[IFNAMSIZ]; | 131 | char primary[IFNAMSIZ]; |
132 | int primary_reselect; | ||
134 | __be32 arp_targets[BOND_MAX_ARP_TARGETS]; | 133 | __be32 arp_targets[BOND_MAX_ARP_TARGETS]; |
135 | }; | 134 | }; |
136 | 135 | ||
@@ -190,6 +189,7 @@ struct bonding { | |||
190 | struct slave *curr_active_slave; | 189 | struct slave *curr_active_slave; |
191 | struct slave *current_arp_slave; | 190 | struct slave *current_arp_slave; |
192 | struct slave *primary_slave; | 191 | struct slave *primary_slave; |
192 | bool force_primary; | ||
193 | s32 slave_cnt; /* never change this value outside the attach/detach wrappers */ | 193 | s32 slave_cnt; /* never change this value outside the attach/detach wrappers */ |
194 | rwlock_t lock; | 194 | rwlock_t lock; |
195 | rwlock_t curr_slave_lock; | 195 | rwlock_t curr_slave_lock; |
@@ -197,14 +197,13 @@ struct bonding { | |||
197 | s8 send_grat_arp; | 197 | s8 send_grat_arp; |
198 | s8 send_unsol_na; | 198 | s8 send_unsol_na; |
199 | s8 setup_by_slave; | 199 | s8 setup_by_slave; |
200 | struct net_device_stats stats; | ||
201 | #ifdef CONFIG_PROC_FS | 200 | #ifdef CONFIG_PROC_FS |
202 | struct proc_dir_entry *proc_entry; | 201 | struct proc_dir_entry *proc_entry; |
203 | char proc_file_name[IFNAMSIZ]; | 202 | char proc_file_name[IFNAMSIZ]; |
204 | #endif /* CONFIG_PROC_FS */ | 203 | #endif /* CONFIG_PROC_FS */ |
205 | struct list_head bond_list; | 204 | struct list_head bond_list; |
206 | struct dev_mc_list *mc_list; | 205 | struct dev_mc_list *mc_list; |
207 | int (*xmit_hash_policy)(struct sk_buff *, struct net_device *, int); | 206 | int (*xmit_hash_policy)(struct sk_buff *, int); |
208 | __be32 master_ip; | 207 | __be32 master_ip; |
209 | u16 flags; | 208 | u16 flags; |
210 | u16 rr_tx_counter; | 209 | u16 rr_tx_counter; |
@@ -254,10 +253,14 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave) | |||
254 | 253 | ||
255 | static inline bool bond_is_lb(const struct bonding *bond) | 254 | static inline bool bond_is_lb(const struct bonding *bond) |
256 | { | 255 | { |
257 | return bond->params.mode == BOND_MODE_TLB | 256 | return (bond->params.mode == BOND_MODE_TLB || |
258 | || bond->params.mode == BOND_MODE_ALB; | 257 | bond->params.mode == BOND_MODE_ALB); |
259 | } | 258 | } |
260 | 259 | ||
260 | #define BOND_PRI_RESELECT_ALWAYS 0 | ||
261 | #define BOND_PRI_RESELECT_BETTER 1 | ||
262 | #define BOND_PRI_RESELECT_FAILURE 2 | ||
263 | |||
261 | #define BOND_FOM_NONE 0 | 264 | #define BOND_FOM_NONE 0 |
262 | #define BOND_FOM_ACTIVE 1 | 265 | #define BOND_FOM_ACTIVE 1 |
263 | #define BOND_FOM_FOLLOW 2 | 266 | #define BOND_FOM_FOLLOW 2 |
@@ -321,12 +324,11 @@ static inline void bond_unset_master_alb_flags(struct bonding *bond) | |||
321 | 324 | ||
322 | struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); | 325 | struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); |
323 | int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev); | 326 | int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev); |
324 | int bond_create(const char *name); | 327 | int bond_create(struct net *net, const char *name); |
325 | int bond_release_and_destroy(struct net_device *bond_dev, struct net_device *slave_dev); | 328 | int bond_release_and_destroy(struct net_device *bond_dev, struct net_device *slave_dev); |
326 | int bond_create_sysfs(void); | 329 | int bond_create_sysfs(void); |
327 | void bond_destroy_sysfs(void); | 330 | void bond_destroy_sysfs(void); |
328 | void bond_destroy_sysfs_entry(struct bonding *bond); | 331 | void bond_prepare_sysfs_group(struct bonding *bond); |
329 | int bond_create_sysfs_entry(struct bonding *bond); | ||
330 | int bond_create_slave_symlinks(struct net_device *master, struct net_device *slave); | 332 | int bond_create_slave_symlinks(struct net_device *master, struct net_device *slave); |
331 | void bond_destroy_slave_symlinks(struct net_device *master, struct net_device *slave); | 333 | void bond_destroy_slave_symlinks(struct net_device *master, struct net_device *slave); |
332 | int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev); | 334 | int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev); |
@@ -341,13 +343,22 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active); | |||
341 | void bond_register_arp(struct bonding *); | 343 | void bond_register_arp(struct bonding *); |
342 | void bond_unregister_arp(struct bonding *); | 344 | void bond_unregister_arp(struct bonding *); |
343 | 345 | ||
346 | struct bond_net { | ||
347 | struct net * net; /* Associated network namespace */ | ||
348 | struct list_head dev_list; | ||
349 | #ifdef CONFIG_PROC_FS | ||
350 | struct proc_dir_entry * proc_dir; | ||
351 | #endif | ||
352 | }; | ||
353 | |||
344 | /* exported from bond_main.c */ | 354 | /* exported from bond_main.c */ |
345 | extern struct list_head bond_dev_list; | 355 | extern int bond_net_id; |
346 | extern const struct bond_parm_tbl bond_lacp_tbl[]; | 356 | extern const struct bond_parm_tbl bond_lacp_tbl[]; |
347 | extern const struct bond_parm_tbl bond_mode_tbl[]; | 357 | extern const struct bond_parm_tbl bond_mode_tbl[]; |
348 | extern const struct bond_parm_tbl xmit_hashtype_tbl[]; | 358 | extern const struct bond_parm_tbl xmit_hashtype_tbl[]; |
349 | extern const struct bond_parm_tbl arp_validate_tbl[]; | 359 | extern const struct bond_parm_tbl arp_validate_tbl[]; |
350 | extern const struct bond_parm_tbl fail_over_mac_tbl[]; | 360 | extern const struct bond_parm_tbl fail_over_mac_tbl[]; |
361 | extern const struct bond_parm_tbl pri_reselect_tbl[]; | ||
351 | extern struct bond_parm_tbl ad_select_tbl[]; | 362 | extern struct bond_parm_tbl ad_select_tbl[]; |
352 | 363 | ||
353 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 364 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
@@ -370,4 +381,3 @@ static inline void bond_unregister_ipv6_notifier(void) | |||
370 | #endif | 381 | #endif |
371 | 382 | ||
372 | #endif /* _LINUX_BONDING_H */ | 383 | #endif /* _LINUX_BONDING_H */ |
373 | |||