drivers: net: generalize napi_complete_done()
napi_complete_done() allows to opt-in for gro_flush_timeout,
added back in linux-3.19, commit 3b47d30396
("net: gro: add a per device gro flush timer")
This allows for more efficient GRO aggregation without
sacrifying latencies.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
63a6fff353
commit
6ad20165d3
@@ -1843,7 +1843,7 @@ static int ofld_poll(struct napi_struct *napi, int budget)
|
||||
__skb_queue_head_init(&queue);
|
||||
skb_queue_splice_init(&q->rx_queue, &queue);
|
||||
if (skb_queue_empty(&queue)) {
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, work_done);
|
||||
spin_unlock_irq(&q->lock);
|
||||
return work_done;
|
||||
}
|
||||
@@ -2414,7 +2414,7 @@ static int napi_rx_handler(struct napi_struct *napi, int budget)
|
||||
int work_done = process_responses(adap, qs, budget);
|
||||
|
||||
if (likely(work_done < budget)) {
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, work_done);
|
||||
|
||||
/*
|
||||
* Because we don't atomically flush the following
|
||||
|
Reference in New Issue
Block a user