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>
This commit is contained in:
		
					parent
					
						
							
								3fcb95a84f
							
						
					
				
			
			
				commit
				
					
						a64d044e39
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -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)) {
 | 
						if (iph->protocol == IPPROTO_IGMP && skb->protocol == htons(ETH_P_IP)) {
 | 
				
			||||||
		slave = rcu_dereference(bond->curr_active_slave);
 | 
							slave = rcu_dereference(bond->curr_active_slave);
 | 
				
			||||||
		if (slave && bond_slave_can_tx(slave))
 | 
							if (slave)
 | 
				
			||||||
			bond_dev_queue_xmit(bond, skb, slave->dev);
 | 
								bond_dev_queue_xmit(bond, skb, slave->dev);
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			bond_xmit_slave_id(bond, skb, 0);
 | 
								bond_xmit_slave_id(bond, skb, 0);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue