diff options
Diffstat (limited to 'net/core/dev.c')
| -rw-r--r-- | net/core/dev.c | 11 | 
1 files changed, 9 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 0ffcbdd55fa9..ddc551f24ba2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5655,6 +5655,10 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)  	skb->vlan_tci = 0;  	skb->dev = napi->dev;  	skb->skb_iif = 0; + +	/* eth_type_trans() assumes pkt_type is PACKET_HOST */ +	skb->pkt_type = PACKET_HOST; +  	skb->encapsulation = 0;  	skb_shinfo(skb)->gso_type = 0;  	skb->truesize = SKB_TRUESIZE(skb_end_offset(skb)); @@ -5966,11 +5970,14 @@ bool napi_complete_done(struct napi_struct *n, int work_done)  		if (work_done)  			timeout = n->dev->gro_flush_timeout; +		/* When the NAPI instance uses a timeout and keeps postponing +		 * it, we need to bound somehow the time packets are kept in +		 * the GRO layer +		 */ +		napi_gro_flush(n, !!timeout);  		if (timeout)  			hrtimer_start(&n->timer, ns_to_ktime(timeout),  				      HRTIMER_MODE_REL_PINNED); -		else -			napi_gro_flush(n, false);  	}  	if (unlikely(!list_empty(&n->poll_list))) {  		/* If n->poll_list is not empty, we need to mask irqs */  | 
