bonding: slight optimization for bond_xmit_roundrobin()
authordingtianhong <dingtianhong@huawei.com>
Fri, 19 Sep 2014 13:04:57 +0000 (21:04 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Sep 2014 19:21:00 +0000 (15:21 -0400)
When the slave is the curr_active_slave, no need to check
whether the slave is active or not, it is always active.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c

index 5e7987bba5834a20749922c5b283fc182f57bb43..88b1ab04ce4b4c1ba7659550aae989f7422d2d79 100644 (file)
@@ -3526,7 +3526,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);