diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 11 | ||||
-rw-r--r-- | net/core/skbuff.c | 5 |
2 files changed, 14 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) | |||
5655 | skb->vlan_tci = 0; | 5655 | skb->vlan_tci = 0; |
5656 | skb->dev = napi->dev; | 5656 | skb->dev = napi->dev; |
5657 | skb->skb_iif = 0; | 5657 | skb->skb_iif = 0; |
5658 | |||
5659 | /* eth_type_trans() assumes pkt_type is PACKET_HOST */ | ||
5660 | skb->pkt_type = PACKET_HOST; | ||
5661 | |||
5658 | skb->encapsulation = 0; | 5662 | skb->encapsulation = 0; |
5659 | skb_shinfo(skb)->gso_type = 0; | 5663 | skb_shinfo(skb)->gso_type = 0; |
5660 | skb->truesize = SKB_TRUESIZE(skb_end_offset(skb)); | 5664 | skb->truesize = SKB_TRUESIZE(skb_end_offset(skb)); |
@@ -5966,11 +5970,14 @@ bool napi_complete_done(struct napi_struct *n, int work_done) | |||
5966 | if (work_done) | 5970 | if (work_done) |
5967 | timeout = n->dev->gro_flush_timeout; | 5971 | timeout = n->dev->gro_flush_timeout; |
5968 | 5972 | ||
5973 | /* When the NAPI instance uses a timeout and keeps postponing | ||
5974 | * it, we need to bound somehow the time packets are kept in | ||
5975 | * the GRO layer | ||
5976 | */ | ||
5977 | napi_gro_flush(n, !!timeout); | ||
5969 | if (timeout) | 5978 | if (timeout) |
5970 | hrtimer_start(&n->timer, ns_to_ktime(timeout), | 5979 | hrtimer_start(&n->timer, ns_to_ktime(timeout), |
5971 | HRTIMER_MODE_REL_PINNED); | 5980 | HRTIMER_MODE_REL_PINNED); |
5972 | else | ||
5973 | napi_gro_flush(n, false); | ||
5974 | } | 5981 | } |
5975 | if (unlikely(!list_empty(&n->poll_list))) { | 5982 | if (unlikely(!list_empty(&n->poll_list))) { |
5976 | /* If n->poll_list is not empty, we need to mask irqs */ | 5983 | /* If n->poll_list is not empty, we need to mask irqs */ |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index b4ee5c8b928f..a8217e221e19 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -4854,6 +4854,11 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet) | |||
4854 | nf_reset(skb); | 4854 | nf_reset(skb); |
4855 | nf_reset_trace(skb); | 4855 | nf_reset_trace(skb); |
4856 | 4856 | ||
4857 | #ifdef CONFIG_NET_SWITCHDEV | ||
4858 | skb->offload_fwd_mark = 0; | ||
4859 | skb->offload_mr_fwd_mark = 0; | ||
4860 | #endif | ||
4861 | |||
4857 | if (!xnet) | 4862 | if (!xnet) |
4858 | return; | 4863 | return; |
4859 | 4864 | ||