]> git.baikalelectronics.ru Git - kernel.git/commit
net: gro: selective flush of packets
authorEric Dumazet <edumazet@google.com>
Sat, 6 Oct 2012 08:08:49 +0000 (08:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Oct 2012 18:51:51 +0000 (14:51 -0400)
commit15e3a08941c18129182bc205ad70743a9532f0d4
treeeb2e2d47361b35b2b5a3f26beac3d1fbd888c372
parentbc2cac8f7e1aaf0aed65b631958a50025a038a4f
net: gro: selective flush of packets

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>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Jesse Gross <jesse@nicira.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/skge.c
drivers/net/ethernet/realtek/8139cp.c
include/linux/netdevice.h
net/core/dev.c