[3.16.y-ckt stable] Patch "bonding: Bonding Overriding Configuration logic restored." has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Tue Apr 28 11:41:25 UTC 2015


This is a note to let you know that I have just added a patch titled

    bonding: Bonding Overriding Configuration logic restored.

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt11.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From a744e383d070a618657dc532bb184d3d1974bef4 Mon Sep 17 00:00:00 2001
From: Anton Nayshtut <anton at swortex.com>
Date: Sun, 29 Mar 2015 14:20:25 +0300
Subject: bonding: Bonding Overriding Configuration logic restored.

commit f5e2dc5d7fe78fe4d8748d217338f4f7b6a5d7ea upstream.

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 at swortex.com>
Signed-off-by: Alexey Bogoslavsky <alexey at swortex.com>
Signed-off-by: Andy Gospodarek <gospo at cumulusnetworks.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/net/bonding/bond_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 6c795cfd6bbc..14faf3ec7c7f 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3763,7 +3763,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;
 			}




More information about the kernel-team mailing list