Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b928c63d authored by Anton Nayshtut's avatar Anton Nayshtut Committed by Hamad Kadmany
Browse files

bonding: Bonding Overriding Configuration logic restored.



Before commit 3900f290 ("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.

Change-Id: I11da4c4bae4c677124ff20c6fc3b8725be935b27
Signed-off-by: default avatarAnton Nayshtut <anton@swortex.com>
Signed-off-by: default avatarAlexey Bogoslavsky <alexey@swortex.com>
Signed-off-by: default avatarAndy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Git-commit: f5e2dc5d7fe78fe4d8748d217338f4f7b6a5d7ea
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git


Signed-off-by: default avatarHamad Kadmany <hkadmany@codeaurora.org>
parent 738fe103
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
			}