diff options
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
-rw-r--r-- | drivers/net/bonding/bond_alb.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 3455f2cc13f2..22e5632089ac 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -104,6 +104,7 @@ static void __tlb_clear_slave(struct bonding *bond, struct slave *slave, index = SLAVE_TLB_INFO(slave).head; while (index != TLB_NULL_INDEX) { u32 next_index = tx_hash_table[index].next; + tlb_init_table_entry(&tx_hash_table[index], save_load); index = next_index; } @@ -228,7 +229,7 @@ static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, { struct slave *tx_slave; - /* We don't need to disable softirq here, becase + /* We don't need to disable softirq here, because * tlb_choose_channel() is only called by bond_alb_xmit() * which already has softirq disabled. */ @@ -608,7 +609,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, client_info->ip_src = arp->ip_src; client_info->ip_dst = arp->ip_dst; - /* arp->mac_dst is broadcast for arp reqeusts. + /* arp->mac_dst is broadcast for arp requests. * will be updated with clients actual unicast mac address * upon receiving an arp reply. */ @@ -628,6 +629,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, if (!client_info->assigned) { u32 prev_tbl_head = bond_info->rx_hashtbl_used_head; + bond_info->rx_hashtbl_used_head = hash_index; client_info->used_next = prev_tbl_head; if (prev_tbl_head != RLB_NULL_INDEX) { @@ -830,9 +832,10 @@ static void rlb_purge_src_ip(struct bonding *bond, struct arp_pkt *arp) while (index != RLB_NULL_INDEX) { struct rlb_client_info *entry = &(bond_info->rx_hashtbl[index]); u32 next_index = entry->src_next; + if (entry->ip_src == arp->ip_src && !ether_addr_equal_64bits(arp->mac_src, entry->mac_src)) - rlb_delete_table_entry(bond, index); + rlb_delete_table_entry(bond, index); index = next_index; } spin_unlock_bh(&bond->mode_lock); @@ -1268,7 +1271,7 @@ unwind: return res; } -/************************ exported alb funcions ************************/ +/************************ exported alb functions ************************/ int bond_alb_initialize(struct bonding *bond, int rlb_enabled) { @@ -1547,7 +1550,7 @@ void bond_alb_monitor(struct work_struct *work) bond_for_each_slave_rcu(bond, slave, iter) { /* If updating current_active, use all currently - * user mac addreses (!strict_match). Otherwise, only + * user mac addresses (!strict_match). Otherwise, only * use mac of the slave device. * In RLB mode, we always use strict matches. */ |