Lines Matching defs:slave
49 * Checks whether slave is ready for transmit.
51 #define SLAVE_IS_OK(slave) \
52 (((slave)->dev->flags & IFF_UP) && \
53 netif_running((slave)->dev) && \
54 ((slave)->link == BOND_LINK_UP) && \
55 ((slave)->state == BOND_STATE_ACTIVE))
82 * @pos: current slave.
96 * @pos: current slave.
111 * @pos: current slave.
157 struct slave {
159 struct slave *next;
160 struct slave *prev;
185 * 1) Get bond->lock when reading/writing slave list.
193 struct slave *first_slave;
194 struct slave *curr_active_slave;
195 struct slave *current_arp_slave;
196 struct slave *primary_slave;
236 static inline struct slave *bond_get_slave_by_dev(struct bonding *bond, struct net_device *slave_dev)
238 struct slave *slave = NULL;
241 bond_for_each_slave(bond, slave, i) {
242 if (slave->dev == slave_dev) {
243 return slave;
250 static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
252 if (!slave || !slave->dev->master) {
256 return (struct bonding *)netdev_priv(slave->dev->master);
280 struct slave *slave)
282 return bond->params.arp_validate & (1 << slave->state);
286 struct slave *slave)
288 if (slave_do_arp_validate(bond, slave))
289 return slave->last_arp_rx;
291 return slave->dev->last_rx;
294 static inline void bond_set_slave_inactive_flags(struct slave *slave)
296 struct bonding *bond = netdev_priv(slave->dev->master);
298 slave->state = BOND_STATE_BACKUP;
300 slave->dev->priv_flags |= IFF_SLAVE_INACTIVE;
301 if (slave_do_arp_validate(bond, slave))
302 slave->dev->priv_flags |= IFF_SLAVE_NEEDARP;
305 static inline void bond_set_slave_active_flags(struct slave *slave)
307 slave->state = BOND_STATE_ACTIVE;
308 slave->dev->priv_flags &= ~(IFF_SLAVE_INACTIVE | IFF_SLAVE_NEEDARP);
338 int bond_create_slave_symlinks(struct net_device *master, struct net_device *slave);
339 void bond_destroy_slave_symlinks(struct net_device *master, struct net_device *slave);
348 void bond_change_active_slave(struct bonding *bond, struct slave *new_active);