diff options
author | Anton Nayshtut <anton@swortex.com> | 2015-03-29 14:20:25 +0300 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-04-27 16:48:26 -0400 |
commit | 98ec7a5e47f46ea601dd4a8175ee6681f4b8a79a (patch) | |
tree | f42e433e6e1b96571135c3dc9b4cfa763a0ddd75 | |
parent | 65b7ff47a780ec95012bdbf1441056a62cbf27c5 (diff) |
bonding: Bonding Overriding Configuration logic restored.
[ Upstream commit f5e2dc5d7fe78fe4d8748d217338f4f7b6a5d7ea ]
Before commit 3900f29021f0bc7fe9815aa32f1a993b7dfdd402 ("bonding: slight
optimizztion for bond_slave_override()") the override logic was to send packets
with non-zero queue_id through the slave with corresponding queue_id, under two
conditions only - if the slave can transmit and it's up.
The above mentioned commit changed this logic by introducing an additional
condition - whether the bond is active (indirectly, using the slave_can_tx and
later - bond_is_active_slave), that prevents the user from implementing more
complex policies according to the Documentation/networking/bonding.txt.
Signed-off-by: Anton Nayshtut <anton@swortex.com>
Signed-off-by: Alexey Bogoslavsky <alexey@swortex.com>
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r-- | drivers/net/bonding/bond_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index a5115fb7cf33..df3db17ee7e6 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3799,7 +3799,8 @@ static inline int bond_slave_override(struct bonding *bond, /* Find out if any slaves have the same mapping as this skb. */ bond_for_each_slave_rcu(bond, slave, iter) { if (slave->queue_id == skb->queue_mapping) { - if (bond_slave_can_tx(slave)) { + if (bond_slave_is_up(slave) && + slave->link == BOND_LINK_UP) { bond_dev_queue_xmit(bond, skb, slave->dev); return 0; } |