diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index d83582623cd7..f69b2fcdee40 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -5981,11 +5981,14 @@ bool napi_complete_done(struct napi_struct *n, int work_done) | |||
5981 | if (work_done) | 5981 | if (work_done) |
5982 | timeout = n->dev->gro_flush_timeout; | 5982 | timeout = n->dev->gro_flush_timeout; |
5983 | 5983 | ||
5984 | /* When the NAPI instance uses a timeout and keeps postponing | ||
5985 | * it, we need to bound somehow the time packets are kept in | ||
5986 | * the GRO layer | ||
5987 | */ | ||
5988 | napi_gro_flush(n, !!timeout); | ||
5984 | if (timeout) | 5989 | if (timeout) |
5985 | hrtimer_start(&n->timer, ns_to_ktime(timeout), | 5990 | hrtimer_start(&n->timer, ns_to_ktime(timeout), |
5986 | HRTIMER_MODE_REL_PINNED); | 5991 | HRTIMER_MODE_REL_PINNED); |
5987 | else | ||
5988 | napi_gro_flush(n, false); | ||
5989 | } | 5992 | } |
5990 | if (unlikely(!list_empty(&n->poll_list))) { | 5993 | if (unlikely(!list_empty(&n->poll_list))) { |
5991 | /* If n->poll_list is not empty, we need to mask irqs */ | 5994 | /* If n->poll_list is not empty, we need to mask irqs */ |