Re: [PATCH] net: gro: selective flush of packets

David Miller
2012-10-08T18:52:19Z

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 06 Oct 2012 20:08:49 +0200

> From: Eric Dumazet <edumazet@google.com>
>
> Current GRO can hold packets in gro_list for almost unlimited
> time, in case napi->poll() handler consumes its budget over and over.
>
> In this case, napi_complete()/napi_gro_flush() are not called.
>
> Another problem is that gro_list is flushed in non friendly way :
> We scan the list and complete packets in the reverse order.
> (youngest packets first, oldest packets last)
> This defeats priorities that sender could have cooked.
>
> Since GRO currently only store TCP packets, we dont really notice the
> bug because of retransmits, but this behavior can add unexpected
> latencies, particularly on mice flows clamped by elephant flows.
>
> This patch makes sure no packet can stay more than 1 ms in queue, and
> only in stress situations.
>
> It also complete packets in the right order to minimize latencies.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, thanks Eric.