net: release dst entry while cache-hot for GSO case too
Non-GSO code drops dst entry for performance reasons, but the same is missing for GSO code. Drop dst while cache-hot for GSO case too. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
					parent
					
						
							
								def87cf420
							
						
					
				
			
			
				commit
				
					
						068a2de57d
					
				
			
		
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
					@ -1853,6 +1853,14 @@ gso:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		skb->next = nskb->next;
 | 
							skb->next = nskb->next;
 | 
				
			||||||
		nskb->next = NULL;
 | 
							nskb->next = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							/*
 | 
				
			||||||
 | 
							 * If device doesnt need nskb->dst, release it right now while
 | 
				
			||||||
 | 
							 * its hot in this cpu cache
 | 
				
			||||||
 | 
							 */
 | 
				
			||||||
 | 
							if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
 | 
				
			||||||
 | 
								skb_dst_drop(nskb);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		rc = ops->ndo_start_xmit(nskb, dev);
 | 
							rc = ops->ndo_start_xmit(nskb, dev);
 | 
				
			||||||
		if (unlikely(rc != NETDEV_TX_OK)) {
 | 
							if (unlikely(rc != NETDEV_TX_OK)) {
 | 
				
			||||||
			if (rc & ~NETDEV_TX_MASK)
 | 
								if (rc & ~NETDEV_TX_MASK)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue