• Home
  • Raw
  • Download

Lines Matching refs:slave

53 #define SLAVE_IS_OK(slave)			        \  argument
54 (((slave)->dev->flags & IFF_UP) && \
55 netif_running((slave)->dev) && \
56 ((slave)->link == BOND_LINK_UP) && \
57 ((slave)->state == BOND_STATE_ACTIVE))
153 struct slave { struct
155 struct slave *next; argument
156 struct slave *prev; argument
189 struct slave *first_slave;
190 struct slave *curr_active_slave;
191 struct slave *current_arp_slave;
192 struct slave *primary_slave;
232 static inline struct slave *bond_get_slave_by_dev(struct bonding *bond, struct net_device *slave_de… in bond_get_slave_by_dev()
234 struct slave *slave = NULL; in bond_get_slave_by_dev() local
237 bond_for_each_slave(bond, slave, i) { in bond_get_slave_by_dev()
238 if (slave->dev == slave_dev) { in bond_get_slave_by_dev()
243 return slave; in bond_get_slave_by_dev()
246 static inline struct bonding *bond_get_bond_by_slave(struct slave *slave) in bond_get_bond_by_slave() argument
248 if (!slave || !slave->dev->master) { in bond_get_bond_by_slave()
252 return (struct bonding *)netdev_priv(slave->dev->master); in bond_get_bond_by_slave()
272 struct slave *slave) in slave_do_arp_validate() argument
274 return bond->params.arp_validate & (1 << slave->state); in slave_do_arp_validate()
278 struct slave *slave) in slave_last_rx() argument
280 if (slave_do_arp_validate(bond, slave)) in slave_last_rx()
281 return slave->last_arp_rx; in slave_last_rx()
283 return slave->dev->last_rx; in slave_last_rx()
286 static inline void bond_set_slave_inactive_flags(struct slave *slave) in bond_set_slave_inactive_flags() argument
288 struct bonding *bond = netdev_priv(slave->dev->master); in bond_set_slave_inactive_flags()
291 slave->state = BOND_STATE_BACKUP; in bond_set_slave_inactive_flags()
292 slave->dev->priv_flags |= IFF_SLAVE_INACTIVE; in bond_set_slave_inactive_flags()
293 if (slave_do_arp_validate(bond, slave)) in bond_set_slave_inactive_flags()
294 slave->dev->priv_flags |= IFF_SLAVE_NEEDARP; in bond_set_slave_inactive_flags()
297 static inline void bond_set_slave_active_flags(struct slave *slave) in bond_set_slave_active_flags() argument
299 slave->state = BOND_STATE_ACTIVE; in bond_set_slave_active_flags()
300 slave->dev->priv_flags &= ~(IFF_SLAVE_INACTIVE | IFF_SLAVE_NEEDARP); in bond_set_slave_active_flags()
332 int bond_create_slave_symlinks(struct net_device *master, struct net_device *slave);
333 void bond_destroy_slave_symlinks(struct net_device *master, struct net_device *slave);
342 void bond_change_active_slave(struct bonding *bond, struct slave *new_active);