diff options
author | Mahesh Bandewar <maheshb@google.com> | 2014-07-16 11:10:36 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-16 23:35:35 -0700 |
commit | 6b794c1cd8e0e693621e846166f6a25b38bcb862 (patch) | |
tree | 5fc8e6faf88ebdcd138efd3b4fc219155e1eb356 /drivers/net/bonding/bond_alb.h | |
parent | f7be2cba90c99e5f803fce2fa8e6dbf9960a9bf0 (diff) | |
download | linux-6b794c1cd8e0e693621e846166f6a25b38bcb862.tar.gz linux-6b794c1cd8e0e693621e846166f6a25b38bcb862.tar.bz2 linux-6b794c1cd8e0e693621e846166f6a25b38bcb862.zip |
bonding: Do not try to send packets over dead link in TLB mode.
In TLB mode if tlb_dynamic_lb is NOT set, slaves from the bond
group are selected based on the hash distribution. This does not
exclude dead links which are part of the bond. Also if there is a
temporary link event which brings down the interface, packets
hashed on that interface would be dropped too.
This patch fixes these issues and distributes flows across the
UP links only. Also the array construction of links which are
capable of sending packets happen in the control path leaving
only link-selection during the data-path.
One possible side effect of this is - at a link event; all
flows will be shuffled to get good distribution. But impact of
this should be minimum with the assumption that a member or
members of the bond group are not available is a very temporary
situation.
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_alb.h')
-rw-r--r-- | drivers/net/bonding/bond_alb.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_alb.h b/drivers/net/bonding/bond_alb.h index 5fc76c01636c..aaeac61d03cf 100644 --- a/drivers/net/bonding/bond_alb.h +++ b/drivers/net/bonding/bond_alb.h @@ -139,12 +139,20 @@ struct tlb_slave_info { */ }; +struct tlb_up_slave { + unsigned int count; + struct rcu_head rcu; + struct slave *arr[0]; +}; + struct alb_bond_info { struct tlb_client_info *tx_hashtbl; /* Dynamically allocated */ spinlock_t tx_hashtbl_lock; u32 unbalanced_load; int tx_rebalance_counter; int lp_counter; + /* -------- non-dynamic tlb mode only ---------*/ + struct tlb_up_slave __rcu *slave_arr; /* Up slaves */ /* -------- rlb parameters -------- */ int rlb_enabled; struct rlb_client_info *rx_hashtbl; /* Receive hash table */ |