aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bonding.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r--drivers/net/bonding/bonding.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index a3c74e20aa53..89fd9963db7a 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -125,6 +125,7 @@ struct bond_params {
125 int mode; 125 int mode;
126 int xmit_policy; 126 int xmit_policy;
127 int miimon; 127 int miimon;
128 int num_grat_arp;
128 int arp_interval; 129 int arp_interval;
129 int arp_validate; 130 int arp_validate;
130 int use_carrier; 131 int use_carrier;
@@ -157,6 +158,7 @@ struct slave {
157 unsigned long jiffies; 158 unsigned long jiffies;
158 unsigned long last_arp_rx; 159 unsigned long last_arp_rx;
159 s8 link; /* one of BOND_LINK_XXXX */ 160 s8 link; /* one of BOND_LINK_XXXX */
161 s8 new_link;
160 s8 state; /* one of BOND_STATE_XXXX */ 162 s8 state; /* one of BOND_STATE_XXXX */
161 u32 original_flags; 163 u32 original_flags;
162 u32 original_mtu; 164 u32 original_mtu;
@@ -169,6 +171,11 @@ struct slave {
169}; 171};
170 172
171/* 173/*
174 * Link pseudo-state only used internally by monitors
175 */
176#define BOND_LINK_NOCHANGE -1
177
178/*
172 * Here are the locking policies for the two bonding locks: 179 * Here are the locking policies for the two bonding locks:
173 * 180 *
174 * 1) Get bond->lock when reading/writing slave list. 181 * 1) Get bond->lock when reading/writing slave list.
@@ -241,6 +248,10 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
241 return (struct bonding *)slave->dev->master->priv; 248 return (struct bonding *)slave->dev->master->priv;
242} 249}
243 250
251#define BOND_FOM_NONE 0
252#define BOND_FOM_ACTIVE 1
253#define BOND_FOM_FOLLOW 2
254
244#define BOND_ARP_VALIDATE_NONE 0 255#define BOND_ARP_VALIDATE_NONE 0
245#define BOND_ARP_VALIDATE_ACTIVE (1 << BOND_STATE_ACTIVE) 256#define BOND_ARP_VALIDATE_ACTIVE (1 << BOND_STATE_ACTIVE)
246#define BOND_ARP_VALIDATE_BACKUP (1 << BOND_STATE_BACKUP) 257#define BOND_ARP_VALIDATE_BACKUP (1 << BOND_STATE_BACKUP)
@@ -301,7 +312,7 @@ static inline void bond_unset_master_alb_flags(struct bonding *bond)
301 312
302struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); 313struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr);
303int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev); 314int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev);
304int bond_create(char *name, struct bond_params *params, struct bonding **newbond); 315int bond_create(char *name, struct bond_params *params);
305void bond_destroy(struct bonding *bond); 316void bond_destroy(struct bonding *bond);
306int bond_release_and_destroy(struct net_device *bond_dev, struct net_device *slave_dev); 317int bond_release_and_destroy(struct net_device *bond_dev, struct net_device *slave_dev);
307int bond_create_sysfs(void); 318int bond_create_sysfs(void);