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:

کامیت شده توسط
David S. Miller

والد
63a6fff353
کامیت
6ad20165d3
@@ -311,7 +311,7 @@ static int alx_poll(struct napi_struct *napi, int budget)
|
||||
if (!tx_complete || work == budget)
|
||||
return budget;
|
||||
|
||||
napi_complete(&np->napi);
|
||||
napi_complete_done(&np->napi, work);
|
||||
|
||||
/* enable interrupt */
|
||||
if (alx->flags & ALX_FLAG_USING_MSIX) {
|
||||
|
@@ -1892,7 +1892,7 @@ static int atl1c_clean(struct napi_struct *napi, int budget)
|
||||
|
||||
if (work_done < budget) {
|
||||
quit_polling:
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, work_done);
|
||||
adapter->hw.intr_mask |= ISR_RX_PKT;
|
||||
AT_WRITE_REG(&adapter->hw, REG_IMR, adapter->hw.intr_mask);
|
||||
}
|
||||
|
@@ -1526,7 +1526,7 @@ static int atl1e_clean(struct napi_struct *napi, int budget)
|
||||
/* If no Tx and not enough Rx work done, exit the polling mode */
|
||||
if (work_done < budget) {
|
||||
quit_polling:
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, work_done);
|
||||
imr_data = AT_READ_REG(&adapter->hw, REG_IMR);
|
||||
AT_WRITE_REG(&adapter->hw, REG_IMR, imr_data | ISR_RX_EVENT);
|
||||
/* test debug */
|
||||
|
@@ -2457,7 +2457,7 @@ static int atl1_rings_clean(struct napi_struct *napi, int budget)
|
||||
if (work_done >= budget)
|
||||
return work_done;
|
||||
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, work_done);
|
||||
/* re-enable Interrupt */
|
||||
if (likely(adapter->int_enabled))
|
||||
atlx_imr_set(adapter, IMR_NORMAL_MASK);
|
||||
|
مرجع در شماره جدید
Block a user