• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/net/bonding/

Lines Matching defs:bond

46  * Checks whether bond is ready for transmit.
48 * Caller must hold bond->lock
50 #define BOND_IS_OK(bond) \
51 (((bond)->dev->flags & IFF_UP) && \
52 netif_running((bond)->dev) && \
53 ((bond)->slave_cnt > 0))
85 * @bond: the bond holding this list.
90 * Caller must hold bond->lock
92 #define bond_for_each_slave_from(bond, pos, cnt, start) \
94 cnt < (bond)->slave_cnt; \
99 * @bond: the bond holding this list.
105 * Caller must hold bond->lock
107 #define bond_for_each_slave_from_to(bond, pos, cnt, start, stop) \
109 ((cnt < (bond)->slave_cnt) && (pos != (stop)->next)); \
114 * @bond: the bond holding this list.
118 * Caller must hold bond->lock
120 #define bond_for_each_slave(bond, pos, cnt) \
121 bond_for_each_slave_from(bond, pos, cnt, (bond)->first_slave)
170 * 1) Get bond->lock when reading/writing slave list.
171 * 2) Get bond->curr_slave_lock when reading/writing bond->curr_active_slave.
172 * (It is unnecessary when the write-lock is put with bond->lock.)
173 * 3) When we lock with bond->curr_slave_lock, we must lock with bond->lock
207 * Returns NULL if the net_device does not belong to any of the bond's slaves
209 * Caller must hold bond lock for read
211 static inline struct slave *bond_get_slave_by_dev(struct bonding *bond, struct net_device *slave_dev)
216 bond_for_each_slave(bond, slave, i) {
240 static inline int slave_do_arp_validate(struct bonding *bond,
243 return bond->params.arp_validate & (1 << slave->state);
246 static inline unsigned long slave_last_rx(struct bonding *bond,
249 if (slave_do_arp_validate(bond, slave))
257 struct bonding *bond = slave->dev->master->priv;
258 if (bond->params.mode != BOND_MODE_TLB &&
259 bond->params.mode != BOND_MODE_ALB)
262 if (slave_do_arp_validate(bond, slave))
272 static inline void bond_set_master_3ad_flags(struct bonding *bond)
274 bond->dev->priv_flags |= IFF_MASTER_8023AD;
277 static inline void bond_unset_master_3ad_flags(struct bonding *bond)
279 bond->dev->priv_flags &= ~IFF_MASTER_8023AD;
282 static inline void bond_set_master_alb_flags(struct bonding *bond)
284 bond->dev->priv_flags |= IFF_MASTER_ALB;
287 static inline void bond_unset_master_alb_flags(struct bonding *bond)
289 bond->dev->priv_flags &= ~IFF_MASTER_ALB;
292 struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr);
293 int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev);
298 void bond_destroy_sysfs_entry(struct bonding *bond);
299 int bond_create_sysfs_entry(struct bonding *bond);
308 void bond_set_mode_ops(struct bonding *bond, int mode);
311 void bond_select_active_slave(struct bonding *bond);
312 void bond_change_active_slave(struct bonding *bond, struct slave *new_active);