Skip to contentSkip to conversation

bonding: slight optimization for bond_xmit_roundrobin()

PATCH Applied Ding Tianhong 2 participants 2 messages Sep 19, 2014 – Sep 22, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 bonding: slight optimization for bond_xmit_roundrobin()

When the slave is the curr_active_slave, no need to check whether the slave is active or not, it is always active.

---
 drivers/net/bonding/bond_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bonding/bond_main.c +1 -1
index b43b2df..0324603 100644
@@ -3624,7 +3624,7 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *bond_dev
 	 */
 	if (iph->protocol == IPPROTO_IGMP && skb->protocol == htons(ETH_P_IP)) {
 		slave = rcu_dereference(bond->curr_active_slave);
-		if (slave && bond_slave_can_tx(slave))
+		if (slave)
 			bond_dev_queue_xmit(bond, skb, slave->dev);
 		else
 			bond_xmit_slave_id(bond, skb, 0);
Signature · 1 line
1.7.12