* [PATCH net-next-2.6 0/3] bonding: TLB / ALB changes
@ 2009-09-30 0:15 Jay Vosburgh
2009-09-30 0:15 ` [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces Jay Vosburgh
0 siblings, 1 reply; 12+ messages in thread
From: Jay Vosburgh @ 2009-09-30 0:15 UTC (permalink / raw)
To: netdev; +Cc: David Miller
Note that this patchset is against net-next-2.6 with these
patches from Jiri Pirko already applied:
http://patchwork.ozlabs.org/patch/32684/
http://patchwork.ozlabs.org/patch/34272/
Three patches for bonding:
Patch 1 changes the tlb/alb algorithm to try and keep hosts
assigned to the same slave during a rebalance.
Patch 2 synchronizes the rx and tx hash tables, and unifies
their locking. Periodic rlb rebalance no longer occurs, as both hash
tables are controlled by the transmit side.
Patch 3 arranges for ARP packets to be sent on a slave that is
appropriate for the destination, instead of always using the same slave
for all ARP traffic.
A fourth patch has been discussed on the list (to dump the alb
and tlb hash tables); that patch is not being submitted at this time,
and may return in a different form at some point in the future.
Please apply for net-next-2.6.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces
2009-09-30 0:15 [PATCH net-next-2.6 0/3] bonding: TLB / ALB changes Jay Vosburgh
@ 2009-09-30 0:15 ` Jay Vosburgh
2009-09-30 0:15 ` [PATCH 2/3] bonding: make sure tx and rx hash tables stay in sync when using alb mode Jay Vosburgh
2009-10-03 1:13 ` [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces Jay Vosburgh
0 siblings, 2 replies; 12+ messages in thread
From: Jay Vosburgh @ 2009-09-30 0:15 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Andy Gospodarek
From: Andy Gospodarek <andy@greyhouse.net>
When using tlb (mode 5) or alb (mode 6) bonding, a task runs every 10s
and re-balances the output devices based on load. I was trying to
diagnose some connectivity issues and realized that a high-traffic host
would often switch output interfaces every 10s. I discovered this
happened because the 'least loaded interface' was chosen as the next
output interface for any given stream and quite often some lower load
traffic would slip in an take the interface previously used by our
stream. This meant the 'least loaded interface' was no longer the one
we used during the last interval.
The switching of streams to another interface was not extremely helpful
as it would force the destination host or router to update its ARP
tables and produce some additional ARP traffic as the destination host
verified that is was using the MAC address it expected. Having the
destination MAC for a given IP change every 10s seems undesirable.
The decision was made to use the same slave during this interval if the
current load on that interface was < 10. A load of < 10 indicates that
during the last 10s sample, roughly 100bytes were sent by all streams
currently assigned to that interface. This essentially means the
interface is unloaded, but allows for a few frames that will probably
have minimal impact to slip into the same interface we were using in the
past.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
drivers/net/bonding/bond_alb.c | 21 ++++++++++++++++++++-
drivers/net/bonding/bond_alb.h | 4 ++++
2 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 9b5936f..cf2842e 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -150,6 +150,7 @@ static inline void tlb_init_table_entry(struct tlb_client_info *entry, int save_
entry->load_history = 1 + entry->tx_bytes /
BOND_TLB_REBALANCE_INTERVAL;
entry->tx_bytes = 0;
+ entry->last_slave = entry->tx_slave;
}
entry->tx_slave = NULL;
@@ -270,6 +271,24 @@ static struct slave *tlb_get_least_loaded_slave(struct bonding *bond)
return least_loaded;
}
+/* Caller must hold bond lock for read and hashtbl lock */
+static struct slave *tlb_get_best_slave(struct bonding *bond, u32 hash_index)
+{
+ struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
+ struct tlb_client_info *tx_hash_table = bond_info->tx_hashtbl;
+ struct slave *last_slave = tx_hash_table[hash_index].last_slave;
+ struct slave *next_slave = NULL;
+
+ if (last_slave && SLAVE_IS_OK(last_slave)) {
+ /* Use the last slave listed in the tx hashtbl if:
+ the last slave currently is essentially unloaded. */
+ if (SLAVE_TLB_INFO(last_slave).load < 10)
+ next_slave = last_slave;
+ }
+
+ return next_slave ? next_slave : tlb_get_least_loaded_slave(bond);
+}
+
/* Caller must hold bond lock for read */
static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, u32 skb_len)
{
@@ -282,7 +301,7 @@ static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, u3
hash_table = bond_info->tx_hashtbl;
assigned_slave = hash_table[hash_index].tx_slave;
if (!assigned_slave) {
- assigned_slave = tlb_get_least_loaded_slave(bond);
+ assigned_slave = tlb_get_best_slave(bond, hash_index);
if (assigned_slave) {
struct tlb_slave_info *slave_info =
diff --git a/drivers/net/bonding/bond_alb.h b/drivers/net/bonding/bond_alb.h
index 50968f8..b65fd29 100644
--- a/drivers/net/bonding/bond_alb.h
+++ b/drivers/net/bonding/bond_alb.h
@@ -36,6 +36,10 @@ struct tlb_client_info {
* packets to a Client that the Hash function
* gave this entry index.
*/
+ struct slave *last_slave; /* Pointer to last slave used for transmiting
+ * packets to a Client that the Hash function
+ * gave this entry index.
+ */
u32 tx_bytes; /* Each Client acumulates the BytesTx that
* were tranmitted to it, and after each
* CallBack the LoadHistory is devided
--
1.6.0.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/3] bonding: make sure tx and rx hash tables stay in sync when using alb mode
2009-09-30 0:15 ` [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces Jay Vosburgh
@ 2009-09-30 0:15 ` Jay Vosburgh
2009-09-30 0:15 ` [PATCH 3/3] bonding: send ARP requests on interfaces other than the primary for tlb/alb Jay Vosburgh
2009-10-03 1:13 ` [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces Jay Vosburgh
1 sibling, 1 reply; 12+ messages in thread
From: Jay Vosburgh @ 2009-09-30 0:15 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Andy Gospodarek
From: Andy Gospodarek <andy@greyhouse.net>
I noticed that it was easy for alb (mode 6) bonding to get into a state
where the tx hash-table and rx hash-table are out of sync (there is
really nothing to keep them synchronized), and we will transmit traffic
destined for a host on one slave and send ARP frames to the same slave
from another interface using a different source MAC.
There is no compelling reason to do this, so this patch makes sure the
rx hash-table changes whenever the tx hash-table is updated based on
device load. This patch also drops the code that does rlb re-balancing
since the balancing will now be controlled by the tx hash-table based on
transmit load. In order to address an issue found with the initial
patch, I have also combined the rx and tx hash table lock into a single
lock. This will facilitate moving these into a single table at some
point.
Patch modified by Jay Vosburgh to fix a typo and remove some leftover
rlb rebalance code.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
drivers/net/bonding/bond_alb.c | 215 ++++++++++++++--------------------------
drivers/net/bonding/bond_alb.h | 7 +-
2 files changed, 75 insertions(+), 147 deletions(-)
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index cf2842e..5cd0400 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -118,6 +118,7 @@ static inline struct arp_pkt *arp_pkt(const struct sk_buff *skb)
/* Forward declaration */
static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[]);
+static struct slave *alb_get_best_slave(struct bonding *bond, u32 hash_index);
static inline u8 _simple_hash(const u8 *hash_start, int hash_size)
{
@@ -131,18 +132,18 @@ static inline u8 _simple_hash(const u8 *hash_start, int hash_size)
return hash;
}
-/*********************** tlb specific functions ***************************/
-
-static inline void _lock_tx_hashtbl(struct bonding *bond)
+/********************* hash table lock functions *************************/
+static inline void _lock_hashtbl(struct bonding *bond)
{
- spin_lock_bh(&(BOND_ALB_INFO(bond).tx_hashtbl_lock));
+ spin_lock_bh(&(BOND_ALB_INFO(bond).hashtbl_lock));
}
-static inline void _unlock_tx_hashtbl(struct bonding *bond)
+static inline void _unlock_hashtbl(struct bonding *bond)
{
- spin_unlock_bh(&(BOND_ALB_INFO(bond).tx_hashtbl_lock));
+ spin_unlock_bh(&(BOND_ALB_INFO(bond).hashtbl_lock));
}
+/*********************** tlb specific functions ***************************/
/* Caller must hold tx_hashtbl lock */
static inline void tlb_init_table_entry(struct tlb_client_info *entry, int save_load)
{
@@ -170,7 +171,7 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_
struct tlb_client_info *tx_hash_table;
u32 index;
- _lock_tx_hashtbl(bond);
+ _lock_hashtbl(bond);
/* clear slave from tx_hashtbl */
tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl;
@@ -187,7 +188,7 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_
tlb_init_slave(slave);
- _unlock_tx_hashtbl(bond);
+ _unlock_hashtbl(bond);
}
/* Must be called before starting the monitor timer */
@@ -198,7 +199,7 @@ static int tlb_initialize(struct bonding *bond)
struct tlb_client_info *new_hashtbl;
int i;
- spin_lock_init(&(bond_info->tx_hashtbl_lock));
+ spin_lock_init(&(bond_info->hashtbl_lock));
new_hashtbl = kzalloc(size, GFP_KERNEL);
if (!new_hashtbl) {
@@ -207,7 +208,7 @@ static int tlb_initialize(struct bonding *bond)
bond->dev->name);
return -1;
}
- _lock_tx_hashtbl(bond);
+ _lock_hashtbl(bond);
bond_info->tx_hashtbl = new_hashtbl;
@@ -215,7 +216,7 @@ static int tlb_initialize(struct bonding *bond)
tlb_init_table_entry(&bond_info->tx_hashtbl[i], 1);
}
- _unlock_tx_hashtbl(bond);
+ _unlock_hashtbl(bond);
return 0;
}
@@ -225,12 +226,12 @@ static void tlb_deinitialize(struct bonding *bond)
{
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
- _lock_tx_hashtbl(bond);
+ _lock_hashtbl(bond);
kfree(bond_info->tx_hashtbl);
bond_info->tx_hashtbl = NULL;
- _unlock_tx_hashtbl(bond);
+ _unlock_hashtbl(bond);
}
/* Caller must hold bond lock for read */
@@ -271,24 +272,6 @@ static struct slave *tlb_get_least_loaded_slave(struct bonding *bond)
return least_loaded;
}
-/* Caller must hold bond lock for read and hashtbl lock */
-static struct slave *tlb_get_best_slave(struct bonding *bond, u32 hash_index)
-{
- struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
- struct tlb_client_info *tx_hash_table = bond_info->tx_hashtbl;
- struct slave *last_slave = tx_hash_table[hash_index].last_slave;
- struct slave *next_slave = NULL;
-
- if (last_slave && SLAVE_IS_OK(last_slave)) {
- /* Use the last slave listed in the tx hashtbl if:
- the last slave currently is essentially unloaded. */
- if (SLAVE_TLB_INFO(last_slave).load < 10)
- next_slave = last_slave;
- }
-
- return next_slave ? next_slave : tlb_get_least_loaded_slave(bond);
-}
-
/* Caller must hold bond lock for read */
static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, u32 skb_len)
{
@@ -296,13 +279,12 @@ static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, u3
struct tlb_client_info *hash_table;
struct slave *assigned_slave;
- _lock_tx_hashtbl(bond);
+ _lock_hashtbl(bond);
hash_table = bond_info->tx_hashtbl;
assigned_slave = hash_table[hash_index].tx_slave;
if (!assigned_slave) {
- assigned_slave = tlb_get_best_slave(bond, hash_index);
-
+ assigned_slave = alb_get_best_slave(bond, hash_index);
if (assigned_slave) {
struct tlb_slave_info *slave_info =
&(SLAVE_TLB_INFO(assigned_slave));
@@ -326,20 +308,52 @@ static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, u3
hash_table[hash_index].tx_bytes += skb_len;
}
- _unlock_tx_hashtbl(bond);
+ _unlock_hashtbl(bond);
return assigned_slave;
}
/*********************** rlb specific functions ***************************/
-static inline void _lock_rx_hashtbl(struct bonding *bond)
+
+/* Caller must hold bond lock for read and hashtbl lock */
+static struct slave *rlb_update_rx_table(struct bonding *bond, struct slave *next_slave, u32 hash_index)
{
- spin_lock_bh(&(BOND_ALB_INFO(bond).rx_hashtbl_lock));
+ struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
+
+ /* check rlb table and correct it if wrong */
+ if (bond_info->rlb_enabled) {
+ struct rlb_client_info *rx_client_info = &(bond_info->rx_hashtbl[hash_index]);
+
+ /* if the new slave computed by tlb checks doesn't match rlb, stop rlb from using it */
+ if (next_slave && (next_slave != rx_client_info->slave))
+ rx_client_info->slave = next_slave;
+ }
+ return next_slave;
}
-static inline void _unlock_rx_hashtbl(struct bonding *bond)
+/* Caller must hold bond lock for read and hashtbl lock */
+static struct slave *alb_get_best_slave(struct bonding *bond, u32 hash_index)
{
- spin_unlock_bh(&(BOND_ALB_INFO(bond).rx_hashtbl_lock));
+ struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
+ struct tlb_client_info *tx_hash_table = bond_info->tx_hashtbl;
+ struct slave *last_slave = tx_hash_table[hash_index].last_slave;
+ struct slave *next_slave = NULL;
+
+ /* presume the next slave will be the least loaded one */
+ next_slave = tlb_get_least_loaded_slave(bond);
+
+ if (last_slave && SLAVE_IS_OK(last_slave)) {
+ /* Use the last slave listed in the tx hashtbl if:
+ the last slave currently is essentially unloaded. */
+ if (SLAVE_TLB_INFO(last_slave).load < 10)
+ next_slave = last_slave;
+ }
+
+ /* update the rlb hashtbl if there was a previous entry */
+ if (bond_info->rlb_enabled)
+ rlb_update_rx_table(bond, next_slave, hash_index);
+
+ return next_slave;
}
/* when an ARP REPLY is received from a client update its info
@@ -351,7 +365,7 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp)
struct rlb_client_info *client_info;
u32 hash_index;
- _lock_rx_hashtbl(bond);
+ _lock_hashtbl(bond);
hash_index = _simple_hash((u8*)&(arp->ip_src), sizeof(arp->ip_src));
client_info = &(bond_info->rx_hashtbl[hash_index]);
@@ -365,7 +379,7 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp)
bond_info->rx_ntt = 1;
}
- _unlock_rx_hashtbl(bond);
+ _unlock_hashtbl(bond);
}
static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct packet_type *ptype, struct net_device *orig_dev)
@@ -409,38 +423,6 @@ out:
return res;
}
-/* Caller must hold bond lock for read */
-static struct slave *rlb_next_rx_slave(struct bonding *bond)
-{
- struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
- struct slave *rx_slave, *slave, *start_at;
- int i = 0;
-
- if (bond_info->next_rx_slave) {
- start_at = bond_info->next_rx_slave;
- } else {
- start_at = bond->first_slave;
- }
-
- rx_slave = NULL;
-
- bond_for_each_slave_from(bond, slave, i, start_at) {
- if (SLAVE_IS_OK(slave)) {
- if (!rx_slave) {
- rx_slave = slave;
- } else if (slave->speed > rx_slave->speed) {
- rx_slave = slave;
- }
- }
- }
-
- if (rx_slave) {
- bond_info->next_rx_slave = rx_slave->next;
- }
-
- return rx_slave;
-}
-
/* teach the switch the mac of a disabled slave
* on the primary for fault tolerance
*
@@ -475,14 +457,14 @@ static void rlb_clear_slave(struct bonding *bond, struct slave *slave)
u32 index, next_index;
/* clear slave from rx_hashtbl */
- _lock_rx_hashtbl(bond);
+ _lock_hashtbl(bond);
rx_hash_table = bond_info->rx_hashtbl;
index = bond_info->rx_hashtbl_head;
for (; index != RLB_NULL_INDEX; index = next_index) {
next_index = rx_hash_table[index].next;
if (rx_hash_table[index].slave == slave) {
- struct slave *assigned_slave = rlb_next_rx_slave(bond);
+ struct slave *assigned_slave = alb_get_best_slave(bond, index);
if (assigned_slave) {
rx_hash_table[index].slave = assigned_slave;
@@ -506,7 +488,7 @@ static void rlb_clear_slave(struct bonding *bond, struct slave *slave)
}
}
- _unlock_rx_hashtbl(bond);
+ _unlock_hashtbl(bond);
write_lock_bh(&bond->curr_slave_lock);
@@ -565,7 +547,7 @@ static void rlb_update_rx_clients(struct bonding *bond)
struct rlb_client_info *client_info;
u32 hash_index;
- _lock_rx_hashtbl(bond);
+ _lock_hashtbl(bond);
hash_index = bond_info->rx_hashtbl_head;
for (; hash_index != RLB_NULL_INDEX; hash_index = client_info->next) {
@@ -583,7 +565,7 @@ static void rlb_update_rx_clients(struct bonding *bond)
*/
bond_info->rlb_update_delay_counter = RLB_UPDATE_DELAY;
- _unlock_rx_hashtbl(bond);
+ _unlock_hashtbl(bond);
}
/* The slave was assigned a new mac address - update the clients */
@@ -594,7 +576,7 @@ static void rlb_req_update_slave_clients(struct bonding *bond, struct slave *sla
int ntt = 0;
u32 hash_index;
- _lock_rx_hashtbl(bond);
+ _lock_hashtbl(bond);
hash_index = bond_info->rx_hashtbl_head;
for (; hash_index != RLB_NULL_INDEX; hash_index = client_info->next) {
@@ -614,7 +596,7 @@ static void rlb_req_update_slave_clients(struct bonding *bond, struct slave *sla
bond_info->rlb_update_retry_counter = RLB_UPDATE_RETRY;
}
- _unlock_rx_hashtbl(bond);
+ _unlock_hashtbl(bond);
}
/* mark all clients using src_ip to be updated */
@@ -624,7 +606,7 @@ static void rlb_req_update_subnet_clients(struct bonding *bond, __be32 src_ip)
struct rlb_client_info *client_info;
u32 hash_index;
- _lock_rx_hashtbl(bond);
+ _lock_hashtbl(bond);
hash_index = bond_info->rx_hashtbl_head;
for (; hash_index != RLB_NULL_INDEX; hash_index = client_info->next) {
@@ -650,7 +632,7 @@ static void rlb_req_update_subnet_clients(struct bonding *bond, __be32 src_ip)
}
}
- _unlock_rx_hashtbl(bond);
+ _unlock_hashtbl(bond);
}
/* Caller must hold both bond and ptr locks for read */
@@ -662,7 +644,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
struct rlb_client_info *client_info;
u32 hash_index = 0;
- _lock_rx_hashtbl(bond);
+ _lock_hashtbl(bond);
hash_index = _simple_hash((u8 *)&arp->ip_dst, sizeof(arp->ip_src));
client_info = &(bond_info->rx_hashtbl[hash_index]);
@@ -678,7 +660,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
assigned_slave = client_info->slave;
if (assigned_slave) {
- _unlock_rx_hashtbl(bond);
+ _unlock_hashtbl(bond);
return assigned_slave;
}
} else {
@@ -694,7 +676,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
}
}
/* assign a new slave */
- assigned_slave = rlb_next_rx_slave(bond);
+ assigned_slave = alb_get_best_slave(bond, hash_index);
if (assigned_slave) {
client_info->ip_src = arp->ip_src;
@@ -730,7 +712,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
}
}
- _unlock_rx_hashtbl(bond);
+ _unlock_hashtbl(bond);
return assigned_slave;
}
@@ -778,36 +760,6 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
return tx_slave;
}
-/* Caller must hold bond lock for read */
-static void rlb_rebalance(struct bonding *bond)
-{
- struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
- struct slave *assigned_slave;
- struct rlb_client_info *client_info;
- int ntt;
- u32 hash_index;
-
- _lock_rx_hashtbl(bond);
-
- ntt = 0;
- hash_index = bond_info->rx_hashtbl_head;
- for (; hash_index != RLB_NULL_INDEX; hash_index = client_info->next) {
- client_info = &(bond_info->rx_hashtbl[hash_index]);
- assigned_slave = rlb_next_rx_slave(bond);
- if (assigned_slave && (client_info->slave != assigned_slave)) {
- client_info->slave = assigned_slave;
- client_info->ntt = 1;
- ntt = 1;
- }
- }
-
- /* update the team's flag only after the whole iteration */
- if (ntt) {
- bond_info->rx_ntt = 1;
- }
- _unlock_rx_hashtbl(bond);
-}
-
/* Caller must hold rx_hashtbl lock */
static void rlb_init_table_entry(struct rlb_client_info *entry)
{
@@ -824,8 +776,6 @@ static int rlb_initialize(struct bonding *bond)
int size = RLB_HASH_TABLE_SIZE * sizeof(struct rlb_client_info);
int i;
- spin_lock_init(&(bond_info->rx_hashtbl_lock));
-
new_hashtbl = kmalloc(size, GFP_KERNEL);
if (!new_hashtbl) {
pr_err(DRV_NAME
@@ -833,7 +783,7 @@ static int rlb_initialize(struct bonding *bond)
bond->dev->name);
return -1;
}
- _lock_rx_hashtbl(bond);
+ _lock_hashtbl(bond);
bond_info->rx_hashtbl = new_hashtbl;
@@ -843,7 +793,7 @@ static int rlb_initialize(struct bonding *bond)
rlb_init_table_entry(bond_info->rx_hashtbl + i);
}
- _unlock_rx_hashtbl(bond);
+ _unlock_hashtbl(bond);
/*initialize packet type*/
pk_type->type = cpu_to_be16(ETH_P_ARP);
@@ -862,13 +812,13 @@ static void rlb_deinitialize(struct bonding *bond)
dev_remove_pack(&(bond_info->rlb_pkt_type));
- _lock_rx_hashtbl(bond);
+ _lock_hashtbl(bond);
kfree(bond_info->rx_hashtbl);
bond_info->rx_hashtbl = NULL;
bond_info->rx_hashtbl_head = RLB_NULL_INDEX;
- _unlock_rx_hashtbl(bond);
+ _unlock_hashtbl(bond);
}
static void rlb_clear_vlan(struct bonding *bond, unsigned short vlan_id)
@@ -876,7 +826,7 @@ static void rlb_clear_vlan(struct bonding *bond, unsigned short vlan_id)
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
u32 curr_index;
- _lock_rx_hashtbl(bond);
+ _lock_hashtbl(bond);
curr_index = bond_info->rx_hashtbl_head;
while (curr_index != RLB_NULL_INDEX) {
@@ -901,7 +851,7 @@ static void rlb_clear_vlan(struct bonding *bond, unsigned short vlan_id)
curr_index = next_index;
}
- _unlock_rx_hashtbl(bond);
+ _unlock_hashtbl(bond);
}
/*********************** tlb/rlb shared functions *********************/
@@ -1525,11 +1475,6 @@ void bond_alb_monitor(struct work_struct *work)
read_lock(&bond->lock);
}
- if (bond_info->rlb_rebalance) {
- bond_info->rlb_rebalance = 0;
- rlb_rebalance(bond);
- }
-
/* check if clients need updating */
if (bond_info->rx_ntt) {
if (bond_info->rlb_update_delay_counter) {
@@ -1582,10 +1527,6 @@ int bond_alb_init_slave(struct bonding *bond, struct slave *slave)
/* order a rebalance ASAP */
bond->alb_info.tx_rebalance_counter = BOND_TLB_REBALANCE_TICKS;
- if (bond->alb_info.rlb_enabled) {
- bond->alb_info.rlb_rebalance = 1;
- }
-
return 0;
}
@@ -1622,14 +1563,6 @@ void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char
} else if (link == BOND_LINK_UP) {
/* order a rebalance ASAP */
bond_info->tx_rebalance_counter = BOND_TLB_REBALANCE_TICKS;
- if (bond->alb_info.rlb_enabled) {
- bond->alb_info.rlb_rebalance = 1;
- /* If the updelay module parameter is smaller than the
- * forwarding delay of the switch the rebalance will
- * not work because the rebalance arp replies will
- * not be forwarded to the clients..
- */
- }
}
}
diff --git a/drivers/net/bonding/bond_alb.h b/drivers/net/bonding/bond_alb.h
index b65fd29..24bf35a 100644
--- a/drivers/net/bonding/bond_alb.h
+++ b/drivers/net/bonding/bond_alb.h
@@ -90,7 +90,7 @@ struct tlb_slave_info {
struct alb_bond_info {
struct timer_list alb_timer;
struct tlb_client_info *tx_hashtbl; /* Dynamically allocated */
- spinlock_t tx_hashtbl_lock;
+ spinlock_t hashtbl_lock; /* lock for both tables */
u32 unbalanced_load;
int tx_rebalance_counter;
int lp_counter;
@@ -98,7 +98,6 @@ struct alb_bond_info {
int rlb_enabled;
struct packet_type rlb_pkt_type;
struct rlb_client_info *rx_hashtbl; /* Receive hash table */
- spinlock_t rx_hashtbl_lock;
u32 rx_hashtbl_head;
u8 rx_ntt; /* flag - need to transmit
* to all rx clients
@@ -115,10 +114,6 @@ struct alb_bond_info {
u32 rlb_update_retry_counter;/* counter of retries
* of client update
*/
- u8 rlb_rebalance; /* flag - indicates that the
- * rx traffic should be
- * rebalanced
- */
struct vlan_entry *current_alb_vlan;
};
--
1.6.0.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/3] bonding: send ARP requests on interfaces other than the primary for tlb/alb
2009-09-30 0:15 ` [PATCH 2/3] bonding: make sure tx and rx hash tables stay in sync when using alb mode Jay Vosburgh
@ 2009-09-30 0:15 ` Jay Vosburgh
2009-09-30 5:20 ` Eric Dumazet
0 siblings, 1 reply; 12+ messages in thread
From: Jay Vosburgh @ 2009-09-30 0:15 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Andy Gospodarek
From: Andy Gospodarek <andy@greyhouse.net>
This patch sends ARP request on the correct destination output interface
rather than always sending them on the primary interface. I've also
added some bits to make sure that the source and destination address in
the ARP header are correct since simply changing the source MAC and
output interface will not be that helpful.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
drivers/net/bonding/bond_alb.c | 45 ++++++++++++++++++---------------------
1 files changed, 21 insertions(+), 24 deletions(-)
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 5cd0400..9148c75 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -726,35 +726,32 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
struct arp_pkt *arp = arp_pkt(skb);
struct slave *tx_slave = NULL;
- if (arp->op_code == htons(ARPOP_REPLY)) {
- /* the arp must be sent on the selected
- * rx channel
- */
- tx_slave = rlb_choose_channel(skb, bond);
- if (tx_slave) {
- memcpy(arp->mac_src,tx_slave->dev->dev_addr, ETH_ALEN);
- }
- pr_debug("Server sent ARP Reply packet\n");
- } else if (arp->op_code == htons(ARPOP_REQUEST)) {
- /* Create an entry in the rx_hashtbl for this client as a
- * place holder.
- * When the arp reply is received the entry will be updated
- * with the correct unicast address of the client.
- */
- rlb_choose_channel(skb, bond);
+ /* Choose an output channel for the ARP frame */
+ tx_slave = rlb_choose_channel(skb, bond);
- /* The ARP relpy packets must be delayed so that
- * they can cancel out the influence of the ARP request.
- */
+ /* If a valid interface is returned, make sure the sender and target MAC
+ * addresses are correct based on the interface that will be transmitting
+ * the frame. */
+ if (tx_slave) {
+ /* If sender mac is the bond's address, rewrite */
+ if (!compare_ether_addr_64bits(arp->mac_src,bond->dev->dev_addr))
+ memcpy(arp->mac_src,tx_slave->dev->dev_addr,bond->dev->addr_len);
+
+ /* If target mac is the bond's address, rewrite */
+ if (!compare_ether_addr_64bits(arp->mac_dst,bond->dev->dev_addr))
+ memcpy(arp->mac_dst,tx_slave->dev->dev_addr,bond->dev->addr_len);
+
+ } else if (arp->op_code == htons(ARPOP_REQUEST)) {
+ /* if tx_slave is NULL, the periodic ARP replies must
+ * be delayed so they can cancel out the influence of
+ * the ARP request. */
bond->alb_info.rlb_update_delay_counter = RLB_UPDATE_DELAY;
- /* arp requests are broadcast and are sent on the primary
- * the arp request will collapse all clients on the subnet to
+ /* ARP requests are broadcast and are sent on the primary
+ * the ARP request will collapse all clients on the subnet to
* the primary slave. We must register these clients to be
- * updated with their assigned mac.
- */
+ * updated with their assigned MAC. */
rlb_req_update_subnet_clients(bond, arp->ip_src);
- pr_debug("Server sent ARP Request packet\n");
}
return tx_slave;
--
1.6.0.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] bonding: send ARP requests on interfaces other than the primary for tlb/alb
2009-09-30 0:15 ` [PATCH 3/3] bonding: send ARP requests on interfaces other than the primary for tlb/alb Jay Vosburgh
@ 2009-09-30 5:20 ` Eric Dumazet
2009-09-30 5:40 ` Jarek Poplawski
2009-09-30 7:27 ` David Miller
0 siblings, 2 replies; 12+ messages in thread
From: Eric Dumazet @ 2009-09-30 5:20 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: netdev, David Miller, Andy Gospodarek
Jay Vosburgh a écrit :
> From: Andy Gospodarek <andy@greyhouse.net>
>
> This patch sends ARP request on the correct destination output interface
> rather than always sending them on the primary interface. I've also
> added some bits to make sure that the source and destination address in
> the ARP header are correct since simply changing the source MAC and
> output interface will not be that helpful.
>
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
>
> ---
> drivers/net/bonding/bond_alb.c | 45 ++++++++++++++++++---------------------
> 1 files changed, 21 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
> index 5cd0400..9148c75 100644
> --- a/drivers/net/bonding/bond_alb.c
> +++ b/drivers/net/bonding/bond_alb.c
> @@ -726,35 +726,32 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
> struct arp_pkt *arp = arp_pkt(skb);
> struct slave *tx_slave = NULL;
>
> - if (arp->op_code == htons(ARPOP_REPLY)) {
> - /* the arp must be sent on the selected
> - * rx channel
> - */
> - tx_slave = rlb_choose_channel(skb, bond);
> - if (tx_slave) {
> - memcpy(arp->mac_src,tx_slave->dev->dev_addr, ETH_ALEN);
> - }
> - pr_debug("Server sent ARP Reply packet\n");
> - } else if (arp->op_code == htons(ARPOP_REQUEST)) {
> - /* Create an entry in the rx_hashtbl for this client as a
> - * place holder.
> - * When the arp reply is received the entry will be updated
> - * with the correct unicast address of the client.
> - */
> - rlb_choose_channel(skb, bond);
> + /* Choose an output channel for the ARP frame */
> + tx_slave = rlb_choose_channel(skb, bond);
>
> - /* The ARP relpy packets must be delayed so that
> - * they can cancel out the influence of the ARP request.
> - */
COmments should have the following form :
/*
* This is a fine comment
*/
> + /* If a valid interface is returned, make sure the sender and target MAC
> + * addresses are correct based on the interface that will be transmitting
> + * the frame. */
> + if (tx_slave) {
> + /* If sender mac is the bond's address, rewrite */
> + if (!compare_ether_addr_64bits(arp->mac_src,bond->dev->dev_addr))
> + memcpy(arp->mac_src,tx_slave->dev->dev_addr,bond->dev->addr_len);
Hmm, you use compare_ether_addr_64bits(), implying a fix ETH_ALEN (6 bytes) address, then
you memcpy( ..., ..., bond->dev->addr_len);
Why not use ETH_ALEN to help compiler ?
Also add a space after a comma
> +
> + /* If target mac is the bond's address, rewrite */
> + if (!compare_ether_addr_64bits(arp->mac_dst,bond->dev->dev_addr))
> + memcpy(arp->mac_dst,tx_slave->dev->dev_addr,bond->dev->addr_len);
> +
> + } else if (arp->op_code == htons(ARPOP_REQUEST)) {
> + /* if tx_slave is NULL, the periodic ARP replies must
> + * be delayed so they can cancel out the influence of
> + * the ARP request. */
> bond->alb_info.rlb_update_delay_counter = RLB_UPDATE_DELAY;
>
> - /* arp requests are broadcast and are sent on the primary
> - * the arp request will collapse all clients on the subnet to
> + /* ARP requests are broadcast and are sent on the primary
> + * the ARP request will collapse all clients on the subnet to
> * the primary slave. We must register these clients to be
Could you reformulate this comment, it is not readable as is :
/*
* ARP requests are broadcast and are sent on the primary.
* The ARP request will collapse all clients on the subnet to
* the primary slave. We must register these clients to be
* updated with their assigned MAC.
*/
> - * updated with their assigned mac.
> - */
> + * updated with their assigned MAC. */
> rlb_req_update_subnet_clients(bond, arp->ip_src);
> - pr_debug("Server sent ARP Request packet\n");
> }
>
> return tx_slave;
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] bonding: send ARP requests on interfaces other than the primary for tlb/alb
2009-09-30 5:20 ` Eric Dumazet
@ 2009-09-30 5:40 ` Jarek Poplawski
2009-09-30 5:49 ` Eric Dumazet
2009-09-30 7:27 ` David Miller
1 sibling, 1 reply; 12+ messages in thread
From: Jarek Poplawski @ 2009-09-30 5:40 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Jay Vosburgh, netdev, David Miller, Andy Gospodarek
On 30-09-2009 07:20, Eric Dumazet wrote:
...
>> + /* Choose an output channel for the ARP frame */
>> + tx_slave = rlb_choose_channel(skb, bond);
>>
>> - /* The ARP relpy packets must be delayed so that
>> - * they can cancel out the influence of the ARP request.
>> - */
>
> COmments should have the following form :
> /*
> * This is a fine comment
> */
It's "The preferred style for long (multi-line) comments [...]".
Jarek P.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] bonding: send ARP requests on interfaces other than the primary for tlb/alb
2009-09-30 5:40 ` Jarek Poplawski
@ 2009-09-30 5:49 ` Eric Dumazet
0 siblings, 0 replies; 12+ messages in thread
From: Eric Dumazet @ 2009-09-30 5:49 UTC (permalink / raw)
To: Jarek Poplawski; +Cc: Jay Vosburgh, netdev, David Miller, Andy Gospodarek
Jarek Poplawski a écrit :
> On 30-09-2009 07:20, Eric Dumazet wrote:
> ...
>>> + /* Choose an output channel for the ARP frame */
>>> + tx_slave = rlb_choose_channel(skb, bond);
>>>
>>> - /* The ARP relpy packets must be delayed so that
>>> - * they can cancel out the influence of the ARP request.
>>> - */
>> COmments should have the following form :
>> /*
>> * This is a fine comment
>> */
>
> It's "The preferred style for long (multi-line) comments [...]".
Yes I agree.
We keep old comments as they are, but for new code submission, we
try to follow common practices.
I know it seems odd, but in the end it helps code readability.
Of course, I would have not point this without another more interesting
stuff in the review process :)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] bonding: send ARP requests on interfaces other than the primary for tlb/alb
2009-09-30 5:20 ` Eric Dumazet
2009-09-30 5:40 ` Jarek Poplawski
@ 2009-09-30 7:27 ` David Miller
2009-09-30 7:49 ` Eric Dumazet
1 sibling, 1 reply; 12+ messages in thread
From: David Miller @ 2009-09-30 7:27 UTC (permalink / raw)
To: eric.dumazet; +Cc: fubar, netdev, andy
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 30 Sep 2009 07:20:23 +0200
> Jay Vosburgh a écrit :
>> - /* The ARP relpy packets must be delayed so that
>> - * they can cancel out the influence of the ARP request.
>> - */
>
> COmments should have the following form :
> /*
> * This is a fine comment
> */
I definitely prefer what is used in the patch, whereas your suggestion
wastes a precious line on the screen and doesn't look markedly better
at all.
Look at any TCP protocol source file and you'll see the consistent
application of:
/* This form of
* comment.
*/
there.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] bonding: send ARP requests on interfaces other than the primary for tlb/alb
2009-09-30 7:27 ` David Miller
@ 2009-09-30 7:49 ` Eric Dumazet
0 siblings, 0 replies; 12+ messages in thread
From: Eric Dumazet @ 2009-09-30 7:49 UTC (permalink / raw)
To: David Miller; +Cc: fubar, netdev, andy
David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Wed, 30 Sep 2009 07:20:23 +0200
>
>> Jay Vosburgh a écrit :
>>> - /* The ARP relpy packets must be delayed so that
>>> - * they can cancel out the influence of the ARP request.
>>> - */
>> COmments should have the following form :
>> /*
>> * This is a fine comment
>> */
>
> I definitely prefer what is used in the patch, whereas your suggestion
> wastes a precious line on the screen and doesn't look markedly better
> at all.
>
> Look at any TCP protocol source file and you'll see the consistent
> application of:
>
> /* This form of
> * comment.
> */
>
> there.
No problem David, I dont want to waste time to discuss this kind of stuff,
but you know my own opinion, and I know yours as well !
As a non native, some things that are painful details for you definitly help
my brain to decode English sentences. Uppercase on first letter, final point,
spelling, ...
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces
2009-09-30 0:15 ` [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces Jay Vosburgh
2009-09-30 0:15 ` [PATCH 2/3] bonding: make sure tx and rx hash tables stay in sync when using alb mode Jay Vosburgh
@ 2009-10-03 1:13 ` Jay Vosburgh
2009-10-05 10:43 ` David Miller
1 sibling, 1 reply; 12+ messages in thread
From: Jay Vosburgh @ 2009-10-03 1:13 UTC (permalink / raw)
To: Andy Gospodarek; +Cc: netdev, David Miller
Jay Vosburgh <fubar@us.ibm.com> wrote:
>From: Andy Gospodarek <andy@greyhouse.net>
>
>When using tlb (mode 5) or alb (mode 6) bonding, a task runs every 10s
>and re-balances the output devices based on load. I was trying to
>diagnose some connectivity issues and realized that a high-traffic host
>would often switch output interfaces every 10s. I discovered this
>happened because the 'least loaded interface' was chosen as the next
>output interface for any given stream and quite often some lower load
>traffic would slip in an take the interface previously used by our
>stream. This meant the 'least loaded interface' was no longer the one
>we used during the last interval.
>
>The switching of streams to another interface was not extremely helpful
>as it would force the destination host or router to update its ARP
>tables and produce some additional ARP traffic as the destination host
>verified that is was using the MAC address it expected. Having the
>destination MAC for a given IP change every 10s seems undesirable.
>
>The decision was made to use the same slave during this interval if the
>current load on that interface was < 10. A load of < 10 indicates that
>during the last 10s sample, roughly 100bytes were sent by all streams
>currently assigned to that interface. This essentially means the
>interface is unloaded, but allows for a few frames that will probably
>have minimal impact to slip into the same interface we were using in the
>past.
Andy, I've been doing some further testing with this patch, and
I'm seeing some panics that I believe are related to this patch. It
appears that the last_slave isn't cleared (or isn't cleared soon enough)
when a slave is released, and concurrent transmit activity is getting
into alb_get_best_slave() and finding a last_slave pointer that is stale
(points to no slave currently on the slave list).
This seems to reproduce fairly consistently when I set up alb
mode with two slaves, change the active slave so that alb mode moves the
MACs around, then release the inactive slave. I run a concurrent "ping
-f" of some remote host.
I added some code to tlb_clear_slave to set last_last to NULL if
save_load is 0, but the problem still happened. I think the race is
that bond_alb_deinit_slave is called with the bond->lock released, but
the slave has already been detached in bond_release, and concurrent
transmit activity gets in and looks up last_slave.
I'm out of time for today, so I'll look at this more on Monday
if I haven't heard back from you.
-J
>Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
>Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
>
>---
> drivers/net/bonding/bond_alb.c | 21 ++++++++++++++++++++-
> drivers/net/bonding/bond_alb.h | 4 ++++
> 2 files changed, 24 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
>index 9b5936f..cf2842e 100644
>--- a/drivers/net/bonding/bond_alb.c
>+++ b/drivers/net/bonding/bond_alb.c
>@@ -150,6 +150,7 @@ static inline void tlb_init_table_entry(struct tlb_client_info *entry, int save_
> entry->load_history = 1 + entry->tx_bytes /
> BOND_TLB_REBALANCE_INTERVAL;
> entry->tx_bytes = 0;
>+ entry->last_slave = entry->tx_slave;
> }
>
> entry->tx_slave = NULL;
>@@ -270,6 +271,24 @@ static struct slave *tlb_get_least_loaded_slave(struct bonding *bond)
> return least_loaded;
> }
>
>+/* Caller must hold bond lock for read and hashtbl lock */
>+static struct slave *tlb_get_best_slave(struct bonding *bond, u32 hash_index)
>+{
>+ struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
>+ struct tlb_client_info *tx_hash_table = bond_info->tx_hashtbl;
>+ struct slave *last_slave = tx_hash_table[hash_index].last_slave;
>+ struct slave *next_slave = NULL;
>+
>+ if (last_slave && SLAVE_IS_OK(last_slave)) {
>+ /* Use the last slave listed in the tx hashtbl if:
>+ the last slave currently is essentially unloaded. */
>+ if (SLAVE_TLB_INFO(last_slave).load < 10)
>+ next_slave = last_slave;
>+ }
>+
>+ return next_slave ? next_slave : tlb_get_least_loaded_slave(bond);
>+}
>+
> /* Caller must hold bond lock for read */
> static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, u32 skb_len)
> {
>@@ -282,7 +301,7 @@ static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, u3
> hash_table = bond_info->tx_hashtbl;
> assigned_slave = hash_table[hash_index].tx_slave;
> if (!assigned_slave) {
>- assigned_slave = tlb_get_least_loaded_slave(bond);
>+ assigned_slave = tlb_get_best_slave(bond, hash_index);
>
> if (assigned_slave) {
> struct tlb_slave_info *slave_info =
>diff --git a/drivers/net/bonding/bond_alb.h b/drivers/net/bonding/bond_alb.h
>index 50968f8..b65fd29 100644
>--- a/drivers/net/bonding/bond_alb.h
>+++ b/drivers/net/bonding/bond_alb.h
>@@ -36,6 +36,10 @@ struct tlb_client_info {
> * packets to a Client that the Hash function
> * gave this entry index.
> */
>+ struct slave *last_slave; /* Pointer to last slave used for transmiting
>+ * packets to a Client that the Hash function
>+ * gave this entry index.
>+ */
> u32 tx_bytes; /* Each Client acumulates the BytesTx that
> * were tranmitted to it, and after each
> * CallBack the LoadHistory is devided
>--
>1.6.0.2
>
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces
2009-10-03 1:13 ` [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces Jay Vosburgh
@ 2009-10-05 10:43 ` David Miller
2009-10-06 16:27 ` Andy Gospodarek
0 siblings, 1 reply; 12+ messages in thread
From: David Miller @ 2009-10-05 10:43 UTC (permalink / raw)
To: fubar; +Cc: andy, netdev
From: Jay Vosburgh <fubar@us.ibm.com>
Date: Fri, 02 Oct 2009 18:13:57 -0700
> Andy, I've been doing some further testing with this patch, and
> I'm seeing some panics that I believe are related to this patch. It
> appears that the last_slave isn't cleared (or isn't cleared soon enough)
> when a slave is released, and concurrent transmit activity is getting
> into alb_get_best_slave() and finding a last_slave pointer that is stale
> (points to no slave currently on the slave list).
I'm holding off on these 3 bonding patches until this is resolved.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces
2009-10-05 10:43 ` David Miller
@ 2009-10-06 16:27 ` Andy Gospodarek
0 siblings, 0 replies; 12+ messages in thread
From: Andy Gospodarek @ 2009-10-06 16:27 UTC (permalink / raw)
To: David Miller; +Cc: fubar, andy, netdev
On Mon, Oct 05, 2009 at 03:43:33AM -0700, David Miller wrote:
> From: Jay Vosburgh <fubar@us.ibm.com>
> Date: Fri, 02 Oct 2009 18:13:57 -0700
>
> > Andy, I've been doing some further testing with this patch, and
> > I'm seeing some panics that I believe are related to this patch. It
> > appears that the last_slave isn't cleared (or isn't cleared soon enough)
> > when a slave is released, and concurrent transmit activity is getting
> > into alb_get_best_slave() and finding a last_slave pointer that is stale
> > (points to no slave currently on the slave list).
>
> I'm holding off on these 3 bonding patches until this is resolved.
> --
Sounds good, Dave.
I was hoping to get this resolved yesterday, but got distracted. I will
have some time today.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-10-06 16:28 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-30 0:15 [PATCH net-next-2.6 0/3] bonding: TLB / ALB changes Jay Vosburgh
2009-09-30 0:15 ` [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces Jay Vosburgh
2009-09-30 0:15 ` [PATCH 2/3] bonding: make sure tx and rx hash tables stay in sync when using alb mode Jay Vosburgh
2009-09-30 0:15 ` [PATCH 3/3] bonding: send ARP requests on interfaces other than the primary for tlb/alb Jay Vosburgh
2009-09-30 5:20 ` Eric Dumazet
2009-09-30 5:40 ` Jarek Poplawski
2009-09-30 5:49 ` Eric Dumazet
2009-09-30 7:27 ` David Miller
2009-09-30 7:49 ` Eric Dumazet
2009-10-03 1:13 ` [PATCH 1/3] bonding: allow previous slave to be used when re-balancing traffic on tlb/alb interfaces Jay Vosburgh
2009-10-05 10:43 ` David Miller
2009-10-06 16:27 ` Andy Gospodarek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).