• Home
  • Raw
  • Download

Lines Matching refs:bond

56 static void rlb_purge_src_ip(struct bonding *bond, struct arp_pkt *arp);
57 static void rlb_src_unlink(struct bonding *bond, u32 index);
58 static void rlb_src_link(struct bonding *bond, u32 ip_src_hash,
93 static void __tlb_clear_slave(struct bonding *bond, struct slave *slave, in __tlb_clear_slave() argument
100 tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl; in __tlb_clear_slave()
115 static void tlb_clear_slave(struct bonding *bond, struct slave *slave, in tlb_clear_slave() argument
118 spin_lock_bh(&bond->mode_lock); in tlb_clear_slave()
119 __tlb_clear_slave(bond, slave, save_load); in tlb_clear_slave()
120 spin_unlock_bh(&bond->mode_lock); in tlb_clear_slave()
124 static int tlb_initialize(struct bonding *bond) in tlb_initialize() argument
126 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in tlb_initialize()
135 spin_lock_bh(&bond->mode_lock); in tlb_initialize()
142 spin_unlock_bh(&bond->mode_lock); in tlb_initialize()
148 static void tlb_deinitialize(struct bonding *bond) in tlb_deinitialize() argument
150 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in tlb_deinitialize()
152 spin_lock_bh(&bond->mode_lock); in tlb_deinitialize()
157 spin_unlock_bh(&bond->mode_lock); in tlb_deinitialize()
166 static struct slave *tlb_get_least_loaded_slave(struct bonding *bond) in tlb_get_least_loaded_slave() argument
176 bond_for_each_slave_rcu(bond, slave, iter) { in tlb_get_least_loaded_slave()
190 static struct slave *__tlb_choose_channel(struct bonding *bond, u32 hash_index, in __tlb_choose_channel() argument
193 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in __tlb_choose_channel()
200 assigned_slave = tlb_get_least_loaded_slave(bond); in __tlb_choose_channel()
226 static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, in tlb_choose_channel() argument
235 spin_lock(&bond->mode_lock); in tlb_choose_channel()
236 tx_slave = __tlb_choose_channel(bond, hash_index, skb_len); in tlb_choose_channel()
237 spin_unlock(&bond->mode_lock); in tlb_choose_channel()
247 static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp) in rlb_update_entry_from_arp() argument
249 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_update_entry_from_arp()
253 spin_lock_bh(&bond->mode_lock); in rlb_update_entry_from_arp()
268 spin_unlock_bh(&bond->mode_lock); in rlb_update_entry_from_arp()
271 static int rlb_arp_recv(const struct sk_buff *skb, struct bonding *bond, in rlb_arp_recv() argument
293 rlb_purge_src_ip(bond, arp); in rlb_arp_recv()
297 rlb_update_entry_from_arp(bond, arp); in rlb_arp_recv()
298 slave_dbg(bond->dev, slave->dev, "Server received an ARP Reply from client\n"); in rlb_arp_recv()
305 static struct slave *__rlb_next_rx_slave(struct bonding *bond) in __rlb_next_rx_slave() argument
307 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in __rlb_next_rx_slave()
312 bond_for_each_slave_rcu(bond, slave, iter) { in __rlb_next_rx_slave()
338 static struct slave *rlb_next_rx_slave(struct bonding *bond) in rlb_next_rx_slave() argument
345 rx_slave = __rlb_next_rx_slave(bond); in rlb_next_rx_slave()
356 static void rlb_teach_disabled_mac_on_primary(struct bonding *bond, u8 addr[]) in rlb_teach_disabled_mac_on_primary() argument
358 struct slave *curr_active = rtnl_dereference(bond->curr_active_slave); in rlb_teach_disabled_mac_on_primary()
363 if (!bond->alb_info.primary_is_promisc) { in rlb_teach_disabled_mac_on_primary()
365 bond->alb_info.primary_is_promisc = 1; in rlb_teach_disabled_mac_on_primary()
367 bond->alb_info.primary_is_promisc = 0; in rlb_teach_disabled_mac_on_primary()
370 bond->alb_info.rlb_promisc_timeout_counter = 0; in rlb_teach_disabled_mac_on_primary()
379 static void rlb_clear_slave(struct bonding *bond, struct slave *slave) in rlb_clear_slave() argument
381 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_clear_slave()
386 spin_lock_bh(&bond->mode_lock); in rlb_clear_slave()
393 struct slave *assigned_slave = rlb_next_rx_slave(bond); in rlb_clear_slave()
416 spin_unlock_bh(&bond->mode_lock); in rlb_clear_slave()
418 if (slave != rtnl_dereference(bond->curr_active_slave)) in rlb_clear_slave()
419 rlb_teach_disabled_mac_on_primary(bond, slave->dev->dev_addr); in rlb_clear_slave()
440 slave_err(client_info->slave->bond->dev, in rlb_update_client()
458 static void rlb_update_rx_clients(struct bonding *bond) in rlb_update_rx_clients() argument
460 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_update_rx_clients()
464 spin_lock_bh(&bond->mode_lock); in rlb_update_rx_clients()
482 spin_unlock_bh(&bond->mode_lock); in rlb_update_rx_clients()
486 static void rlb_req_update_slave_clients(struct bonding *bond, struct slave *slave) in rlb_req_update_slave_clients() argument
488 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_req_update_slave_clients()
493 spin_lock_bh(&bond->mode_lock); in rlb_req_update_slave_clients()
514 spin_unlock_bh(&bond->mode_lock); in rlb_req_update_slave_clients()
518 static void rlb_req_update_subnet_clients(struct bonding *bond, __be32 src_ip) in rlb_req_update_subnet_clients() argument
520 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_req_update_subnet_clients()
524 spin_lock(&bond->mode_lock); in rlb_req_update_subnet_clients()
532 netdev_err(bond->dev, "found a client with no channel in the client's hash table\n"); in rlb_req_update_subnet_clients()
541 bond->dev->dev_addr) && in rlb_req_update_subnet_clients()
548 spin_unlock(&bond->mode_lock); in rlb_req_update_subnet_clients()
552 struct bonding *bond, in rlb_choose_channel() argument
555 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_choose_channel()
560 spin_lock(&bond->mode_lock); in rlb_choose_channel()
562 curr_active_slave = rcu_dereference(bond->curr_active_slave); in rlb_choose_channel()
579 spin_unlock(&bond->mode_lock); in rlb_choose_channel()
595 assigned_slave = __rlb_next_rx_slave(bond); in rlb_choose_channel()
605 rlb_src_unlink(bond, hash_index); in rlb_choose_channel()
606 rlb_src_link(bond, hash_src, hash_index); in rlb_choose_channel()
621 bond->alb_info.rx_ntt = 1; in rlb_choose_channel()
641 spin_unlock(&bond->mode_lock); in rlb_choose_channel()
650 static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond) in rlb_arp_xmit() argument
662 if (!bond_slave_has_mac_rx(bond, arp->mac_src)) in rlb_arp_xmit()
667 tx_slave = rlb_choose_channel(skb, bond, arp); in rlb_arp_xmit()
671 netdev_dbg(bond->dev, "(slave %s): Server sent ARP Reply packet\n", in rlb_arp_xmit()
679 tx_slave = rlb_choose_channel(skb, bond, arp); in rlb_arp_xmit()
684 bond->alb_info.rlb_update_delay_counter = RLB_UPDATE_DELAY; in rlb_arp_xmit()
691 rlb_req_update_subnet_clients(bond, arp->ip_src); in rlb_arp_xmit()
692 netdev_dbg(bond->dev, "(slave %s): Server sent ARP Request packet\n", in rlb_arp_xmit()
699 static void rlb_rebalance(struct bonding *bond) in rlb_rebalance() argument
701 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_rebalance()
707 spin_lock_bh(&bond->mode_lock); in rlb_rebalance()
714 assigned_slave = __rlb_next_rx_slave(bond); in rlb_rebalance()
727 spin_unlock_bh(&bond->mode_lock); in rlb_rebalance()
753 static void rlb_delete_table_entry_dst(struct bonding *bond, u32 index) in rlb_delete_table_entry_dst() argument
755 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_delete_table_entry_dst()
768 static void rlb_src_unlink(struct bonding *bond, u32 index) in rlb_src_unlink() argument
770 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_src_unlink()
791 static void rlb_delete_table_entry(struct bonding *bond, u32 index) in rlb_delete_table_entry() argument
793 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_delete_table_entry()
796 rlb_delete_table_entry_dst(bond, index); in rlb_delete_table_entry()
799 rlb_src_unlink(bond, index); in rlb_delete_table_entry()
805 static void rlb_src_link(struct bonding *bond, u32 ip_src_hash, u32 ip_dst_hash) in rlb_src_link() argument
807 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_src_link()
821 static void rlb_purge_src_ip(struct bonding *bond, struct arp_pkt *arp) in rlb_purge_src_ip() argument
823 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_purge_src_ip()
827 spin_lock_bh(&bond->mode_lock); in rlb_purge_src_ip()
835 rlb_delete_table_entry(bond, index); in rlb_purge_src_ip()
838 spin_unlock_bh(&bond->mode_lock); in rlb_purge_src_ip()
841 static int rlb_initialize(struct bonding *bond) in rlb_initialize() argument
843 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_initialize()
852 spin_lock_bh(&bond->mode_lock); in rlb_initialize()
861 spin_unlock_bh(&bond->mode_lock); in rlb_initialize()
864 bond->recv_probe = rlb_arp_recv; in rlb_initialize()
869 static void rlb_deinitialize(struct bonding *bond) in rlb_deinitialize() argument
871 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_deinitialize()
873 spin_lock_bh(&bond->mode_lock); in rlb_deinitialize()
879 spin_unlock_bh(&bond->mode_lock); in rlb_deinitialize()
882 static void rlb_clear_vlan(struct bonding *bond, unsigned short vlan_id) in rlb_clear_vlan() argument
884 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in rlb_clear_vlan()
887 spin_lock_bh(&bond->mode_lock); in rlb_clear_vlan()
895 rlb_delete_table_entry(bond, curr_index); in rlb_clear_vlan()
900 spin_unlock_bh(&bond->mode_lock); in rlb_clear_vlan()
929 slave_dbg(slave->bond->dev, slave->dev, in alb_send_lp_vid()
939 struct bonding *bond; member
950 struct bonding *bond = data->bond; in alb_upper_dev_walk() local
956 bond->dev->lower_level == upper->lower_level - 1) { in alb_upper_dev_walk()
972 tags = bond_verify_device_path(bond->dev, upper, 0); in alb_upper_dev_walk()
986 struct bonding *bond = bond_get_bond_by_slave(slave); in alb_send_learning_packets() local
992 .bond = bond, in alb_send_learning_packets()
1003 netdev_walk_all_upper_dev_rcu(bond->dev, alb_upper_dev_walk, &priv); in alb_send_learning_packets()
1013 if (BOND_MODE(slave->bond) == BOND_MODE_TLB) { in alb_set_slave_mac_addr()
1024 …slave_err(slave->bond->dev, dev, "dev_set_mac_address on slave failed! ALB mode requires that the … in alb_set_slave_mac_addr()
1051 static void alb_fasten_mac_swap(struct bonding *bond, struct slave *slave1, in alb_fasten_mac_swap() argument
1062 if (bond->alb_info.rlb_enabled) { in alb_fasten_mac_swap()
1066 rlb_req_update_slave_clients(bond, slave1); in alb_fasten_mac_swap()
1074 if (bond->alb_info.rlb_enabled) { in alb_fasten_mac_swap()
1078 rlb_req_update_slave_clients(bond, slave2); in alb_fasten_mac_swap()
1084 if (bond->alb_info.rlb_enabled && slaves_state_differ) { in alb_fasten_mac_swap()
1086 rlb_teach_disabled_mac_on_primary(bond, in alb_fasten_mac_swap()
1105 static void alb_change_hw_addr_on_detach(struct bonding *bond, struct slave *slave) in alb_change_hw_addr_on_detach() argument
1114 bond->dev->dev_addr); in alb_change_hw_addr_on_detach()
1117 found_slave = bond_slave_has_mac(bond, slave->perm_hwaddr); in alb_change_hw_addr_on_detach()
1121 alb_fasten_mac_swap(bond, slave, found_slave); in alb_change_hw_addr_on_detach()
1148 static int alb_handle_addr_collision_on_attach(struct bonding *bond, struct slave *slave) in alb_handle_addr_collision_on_attach() argument
1150 struct slave *has_bond_addr = rcu_access_pointer(bond->curr_active_slave); in alb_handle_addr_collision_on_attach()
1154 if (!bond_has_slaves(bond)) { in alb_handle_addr_collision_on_attach()
1163 if (!ether_addr_equal_64bits(slave->perm_hwaddr, bond->dev->dev_addr)) { in alb_handle_addr_collision_on_attach()
1164 if (!bond_slave_has_mac(bond, slave->dev->dev_addr)) in alb_handle_addr_collision_on_attach()
1170 alb_set_slave_mac_addr(slave, bond->dev->dev_addr, in alb_handle_addr_collision_on_attach()
1171 bond->dev->addr_len); in alb_handle_addr_collision_on_attach()
1177 bond_for_each_slave(bond, tmp_slave1, iter) { in alb_handle_addr_collision_on_attach()
1178 if (!bond_slave_has_mac(bond, tmp_slave1->perm_hwaddr)) { in alb_handle_addr_collision_on_attach()
1188 bond->dev->dev_addr)) { in alb_handle_addr_collision_on_attach()
1199 …slave_warn(bond->dev, slave->dev, "the slave hw address is in use by the bond; giving it the hw ad… in alb_handle_addr_collision_on_attach()
1203 …slave_err(bond->dev, slave->dev, "the slave hw address is in use by the bond; couldn't find a slav… in alb_handle_addr_collision_on_attach()
1224 static int alb_set_mac_address(struct bonding *bond, void *addr) in alb_set_mac_address() argument
1232 if (bond->alb_info.rlb_enabled) in alb_set_mac_address()
1235 bond_for_each_slave(bond, slave, iter) { in alb_set_mac_address()
1253 memcpy(ss.__data, bond->dev->dev_addr, bond->dev->addr_len); in alb_set_mac_address()
1254 ss.ss_family = bond->dev->type; in alb_set_mac_address()
1257 bond_for_each_slave(bond, rollback_slave, iter) { in alb_set_mac_address()
1273 int bond_alb_initialize(struct bonding *bond, int rlb_enabled) in bond_alb_initialize() argument
1277 res = tlb_initialize(bond); in bond_alb_initialize()
1282 bond->alb_info.rlb_enabled = 1; in bond_alb_initialize()
1283 res = rlb_initialize(bond); in bond_alb_initialize()
1285 tlb_deinitialize(bond); in bond_alb_initialize()
1289 bond->alb_info.rlb_enabled = 0; in bond_alb_initialize()
1295 void bond_alb_deinitialize(struct bonding *bond) in bond_alb_deinitialize() argument
1297 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in bond_alb_deinitialize()
1299 tlb_deinitialize(bond); in bond_alb_deinitialize()
1302 rlb_deinitialize(bond); in bond_alb_deinitialize()
1305 static netdev_tx_t bond_do_alb_xmit(struct sk_buff *skb, struct bonding *bond, in bond_do_alb_xmit() argument
1308 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in bond_do_alb_xmit()
1313 tx_slave = rcu_dereference(bond->curr_active_slave); in bond_do_alb_xmit()
1314 if (bond->params.tlb_dynamic_lb) in bond_do_alb_xmit()
1319 if (tx_slave != rcu_access_pointer(bond->curr_active_slave)) { in bond_do_alb_xmit()
1324 return bond_dev_queue_xmit(bond, skb, tx_slave->dev); in bond_do_alb_xmit()
1327 if (tx_slave && bond->params.tlb_dynamic_lb) { in bond_do_alb_xmit()
1328 spin_lock(&bond->mode_lock); in bond_do_alb_xmit()
1329 __tlb_clear_slave(bond, tx_slave, 0); in bond_do_alb_xmit()
1330 spin_unlock(&bond->mode_lock); in bond_do_alb_xmit()
1334 return bond_tx_drop(bond->dev, skb); in bond_do_alb_xmit()
1337 struct slave *bond_xmit_tlb_slave_get(struct bonding *bond, in bond_xmit_tlb_slave_get() argument
1354 hash_index = bond_xmit_hash(bond, skb); in bond_xmit_tlb_slave_get()
1355 if (bond->params.tlb_dynamic_lb) { in bond_xmit_tlb_slave_get()
1356 tx_slave = tlb_choose_channel(bond, in bond_xmit_tlb_slave_get()
1363 slaves = rcu_dereference(bond->usable_slaves); in bond_xmit_tlb_slave_get()
1377 struct bonding *bond = netdev_priv(bond_dev); in bond_tlb_xmit() local
1380 tx_slave = bond_xmit_tlb_slave_get(bond, skb); in bond_tlb_xmit()
1381 return bond_do_alb_xmit(skb, bond, tx_slave); in bond_tlb_xmit()
1384 struct slave *bond_xmit_alb_slave_get(struct bonding *bond, in bond_xmit_alb_slave_get() argument
1387 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in bond_xmit_alb_slave_get()
1486 tx_slave = rlb_arp_xmit(skb, bond); in bond_xmit_alb_slave_get()
1494 if (bond->params.tlb_dynamic_lb) { in bond_xmit_alb_slave_get()
1496 tx_slave = tlb_choose_channel(bond, hash_index, skb->len); in bond_xmit_alb_slave_get()
1506 slaves = rcu_dereference(bond->usable_slaves); in bond_xmit_alb_slave_get()
1509 tx_slave = slaves->arr[bond_xmit_hash(bond, skb) % in bond_xmit_alb_slave_get()
1518 struct bonding *bond = netdev_priv(bond_dev); in bond_alb_xmit() local
1521 tx_slave = bond_xmit_alb_slave_get(bond, skb); in bond_alb_xmit()
1522 return bond_do_alb_xmit(skb, bond, tx_slave); in bond_alb_xmit()
1527 struct bonding *bond = container_of(work, struct bonding, in bond_alb_monitor() local
1529 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in bond_alb_monitor()
1533 if (!bond_has_slaves(bond)) { in bond_alb_monitor()
1545 if (bond_info->lp_counter >= BOND_ALB_LP_TICKS(bond)) { in bond_alb_monitor()
1548 bond_for_each_slave_rcu(bond, slave, iter) { in bond_alb_monitor()
1554 strict_match = (slave != rcu_access_pointer(bond->curr_active_slave) || in bond_alb_monitor()
1564 bond_for_each_slave_rcu(bond, slave, iter) { in bond_alb_monitor()
1565 tlb_clear_slave(bond, slave, 1); in bond_alb_monitor()
1566 if (slave == rcu_access_pointer(bond->curr_active_slave)) { in bond_alb_monitor()
1593 dev_set_promiscuity(rtnl_dereference(bond->curr_active_slave)->dev, in bond_alb_monitor()
1603 rlb_rebalance(bond); in bond_alb_monitor()
1611 rlb_update_rx_clients(bond); in bond_alb_monitor()
1621 queue_delayed_work(bond->wq, &bond->alb_work, alb_delta_in_ticks); in bond_alb_monitor()
1627 int bond_alb_init_slave(struct bonding *bond, struct slave *slave) in bond_alb_init_slave() argument
1636 res = alb_handle_addr_collision_on_attach(bond, slave); in bond_alb_init_slave()
1643 atomic_set(&bond->alb_info.tx_rebalance_counter, in bond_alb_init_slave()
1646 if (bond->alb_info.rlb_enabled) in bond_alb_init_slave()
1647 bond->alb_info.rlb_rebalance = 1; in bond_alb_init_slave()
1657 void bond_alb_deinit_slave(struct bonding *bond, struct slave *slave) in bond_alb_deinit_slave() argument
1659 if (bond_has_slaves(bond)) in bond_alb_deinit_slave()
1660 alb_change_hw_addr_on_detach(bond, slave); in bond_alb_deinit_slave()
1662 tlb_clear_slave(bond, slave, 0); in bond_alb_deinit_slave()
1664 if (bond->alb_info.rlb_enabled) { in bond_alb_deinit_slave()
1665 bond->alb_info.rx_slave = NULL; in bond_alb_deinit_slave()
1666 rlb_clear_slave(bond, slave); in bond_alb_deinit_slave()
1671 void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char link) in bond_alb_handle_link_change() argument
1673 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); in bond_alb_handle_link_change()
1676 tlb_clear_slave(bond, slave, 0); in bond_alb_handle_link_change()
1677 if (bond->alb_info.rlb_enabled) in bond_alb_handle_link_change()
1678 rlb_clear_slave(bond, slave); in bond_alb_handle_link_change()
1683 if (bond->alb_info.rlb_enabled) { in bond_alb_handle_link_change()
1684 bond->alb_info.rlb_rebalance = 1; in bond_alb_handle_link_change()
1693 if (bond_is_nondyn_tlb(bond)) { in bond_alb_handle_link_change()
1694 if (bond_update_slave_arr(bond, NULL)) in bond_alb_handle_link_change()
1709 void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave) in bond_alb_handle_active_change() argument
1714 curr_active = rtnl_dereference(bond->curr_active_slave); in bond_alb_handle_active_change()
1718 if (curr_active && bond->alb_info.primary_is_promisc) { in bond_alb_handle_active_change()
1720 bond->alb_info.primary_is_promisc = 0; in bond_alb_handle_active_change()
1721 bond->alb_info.rlb_promisc_timeout_counter = 0; in bond_alb_handle_active_change()
1725 rcu_assign_pointer(bond->curr_active_slave, new_slave); in bond_alb_handle_active_change()
1727 if (!new_slave || !bond_has_slaves(bond)) in bond_alb_handle_active_change()
1734 swap_slave = bond_slave_has_mac(bond, bond->dev->dev_addr); in bond_alb_handle_active_change()
1741 tlb_clear_slave(bond, swap_slave, 1); in bond_alb_handle_active_change()
1742 tlb_clear_slave(bond, new_slave, 1); in bond_alb_handle_active_change()
1747 if (BOND_MODE(bond) == BOND_MODE_TLB) { in bond_alb_handle_active_change()
1754 bond_hw_addr_copy(ss.__data, bond->dev->dev_addr, in bond_alb_handle_active_change()
1755 bond->dev->addr_len); in bond_alb_handle_active_change()
1756 ss.ss_family = bond->dev->type; in bond_alb_handle_active_change()
1769 alb_fasten_mac_swap(bond, swap_slave, new_slave); in bond_alb_handle_active_change()
1772 alb_set_slave_mac_addr(new_slave, bond->dev->dev_addr, in bond_alb_handle_active_change()
1773 bond->dev->addr_len); in bond_alb_handle_active_change()
1774 alb_send_learning_packets(new_slave, bond->dev->dev_addr, in bond_alb_handle_active_change()
1782 struct bonding *bond = netdev_priv(bond_dev); in bond_alb_set_mac_address() local
1791 res = alb_set_mac_address(bond, addr); in bond_alb_set_mac_address()
1801 curr_active = rtnl_dereference(bond->curr_active_slave); in bond_alb_set_mac_address()
1805 swap_slave = bond_slave_has_mac(bond, bond_dev->dev_addr); in bond_alb_set_mac_address()
1809 alb_fasten_mac_swap(bond, swap_slave, curr_active); in bond_alb_set_mac_address()
1816 if (bond->alb_info.rlb_enabled) { in bond_alb_set_mac_address()
1818 rlb_req_update_slave_clients(bond, curr_active); in bond_alb_set_mac_address()
1825 void bond_alb_clear_vlan(struct bonding *bond, unsigned short vlan_id) in bond_alb_clear_vlan() argument
1827 if (bond->alb_info.rlb_enabled) in bond_alb_clear_vlan()
1828 rlb_clear_vlan(bond, vlan_id); in bond_alb_clear_vlan()