diff options
author | dingtianhong <dingtianhong@huawei.com> | 2014-09-19 09:04:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-22 15:21:00 -0400 |
commit | a64d044e3907b717ae3d1e3711226064b42c83f4 (patch) | |
tree | e54eef6b19aae22b81635bc0439520cbe163604e /drivers/net/bonding | |
parent | 3fcb95a84fdb11e922cfac3b5cd3a9d96a9e9995 (diff) |
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.
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 5e7987bba583..88b1ab04ce4b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3526,7 +3526,7 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *bond_dev | |||
3526 | */ | 3526 | */ |
3527 | if (iph->protocol == IPPROTO_IGMP && skb->protocol == htons(ETH_P_IP)) { | 3527 | if (iph->protocol == IPPROTO_IGMP && skb->protocol == htons(ETH_P_IP)) { |
3528 | slave = rcu_dereference(bond->curr_active_slave); | 3528 | slave = rcu_dereference(bond->curr_active_slave); |
3529 | if (slave && bond_slave_can_tx(slave)) | 3529 | if (slave) |
3530 | bond_dev_queue_xmit(bond, skb, slave->dev); | 3530 | bond_dev_queue_xmit(bond, skb, slave->dev); |
3531 | else | 3531 | else |
3532 | bond_xmit_slave_id(bond, skb, 0); | 3532 | bond_xmit_slave_id(bond, skb, 0); |