diff options
author | Eric Dumazet <edumazet@google.com> | 2012-10-06 04:08:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-08 14:51:51 -0400 |
commit | 2e71a6f8084e7ac87166dd77d99c44190fb844fc (patch) | |
tree | eb2e2d47361b35b2b5a3f26beac3d1fbd888c372 /drivers/net/ethernet/marvell/skge.c | |
parent | a2af139ff1cd85df586690ff626619ab1ee88b0a (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet/marvell/skge.c')
-rw-r--r-- | drivers/net/ethernet/marvell/skge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index 3f7dab46626b..9b9c2ac5c4c2 100644 --- a/drivers/net/ethernet/marvell/skge.c +++ b/drivers/net/ethernet/marvell/skge.c | |||
@@ -3189,7 +3189,7 @@ static int skge_poll(struct napi_struct *napi, int to_do) | |||
3189 | if (work_done < to_do) { | 3189 | if (work_done < to_do) { |
3190 | unsigned long flags; | 3190 | unsigned long flags; |
3191 | 3191 | ||
3192 | napi_gro_flush(napi); | 3192 | napi_gro_flush(napi, false); |
3193 | spin_lock_irqsave(&hw->hw_lock, flags); | 3193 | spin_lock_irqsave(&hw->hw_lock, flags); |
3194 | __napi_complete(napi); | 3194 | __napi_complete(napi); |
3195 | hw->intr_mask |= napimask[skge->port]; | 3195 | hw->intr_mask |= napimask[skge->port]; |