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
@@ -902,7 +902,7 @@ static int b44_poll(struct napi_struct *napi, int budget)
|
||||
}
|
||||
|
||||
if (work_done < budget) {
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, work_done);
|
||||
b44_enable_ints(bp);
|
||||
}
|
||||
|
||||
|
@@ -511,7 +511,7 @@ static int bcm_enet_poll(struct napi_struct *napi, int budget)
|
||||
|
||||
/* no more packet in rx/tx queue, remove device from poll
|
||||
* queue */
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, rx_work_done);
|
||||
|
||||
/* restore rx/tx interrupt */
|
||||
enet_dmac_writel(priv, priv->dma_chan_int_mask,
|
||||
|
@@ -1148,7 +1148,7 @@ static int bgmac_poll(struct napi_struct *napi, int weight)
|
||||
return weight;
|
||||
|
||||
if (handled < weight) {
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, handled);
|
||||
bgmac_chip_intrs_on(bgmac);
|
||||
}
|
||||
|
||||
|
@@ -3515,7 +3515,7 @@ static int bnx2_poll_msix(struct napi_struct *napi, int budget)
|
||||
rmb();
|
||||
if (likely(!bnx2_has_fast_work(bnapi))) {
|
||||
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, work_done);
|
||||
BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bnapi->int_num |
|
||||
BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
|
||||
bnapi->last_status_idx);
|
||||
@@ -3552,7 +3552,7 @@ static int bnx2_poll(struct napi_struct *napi, int budget)
|
||||
|
||||
rmb();
|
||||
if (likely(!bnx2_has_work(bnapi))) {
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, work_done);
|
||||
if (likely(bp->flags & BNX2_FLAG_USING_MSI_OR_MSIX)) {
|
||||
BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
|
||||
BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
|
||||
|
@@ -3224,7 +3224,7 @@ static int bnx2x_poll(struct napi_struct *napi, int budget)
|
||||
* has been updated when NAPI was scheduled.
|
||||
*/
|
||||
if (IS_FCOE_FP(fp)) {
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, rx_work_done);
|
||||
} else {
|
||||
bnx2x_update_fpsb_idx(fp);
|
||||
/* bnx2x_has_rx_work() reads the status block,
|
||||
|
@@ -1759,7 +1759,7 @@ static int bnxt_poll_nitroa0(struct napi_struct *napi, int budget)
|
||||
}
|
||||
|
||||
if (!bnxt_has_work(bp, cpr) && rx_pkts < budget) {
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, rx_pkts);
|
||||
BNXT_CP_DB_REARM(cpr->cp_doorbell, cpr->cp_raw_cons);
|
||||
}
|
||||
return rx_pkts;
|
||||
|
@@ -2537,7 +2537,7 @@ static int sbmac_poll(struct napi_struct *napi, int budget)
|
||||
sbdma_tx_process(sc, &(sc->sbm_txdma), 1);
|
||||
|
||||
if (work_done < budget) {
|
||||
napi_complete(napi);
|
||||
napi_complete_done(napi, work_done);
|
||||
|
||||
#ifdef CONFIG_SBMAC_COALESCE
|
||||
__raw_writeq(((M_MAC_INT_EOP_COUNT | M_MAC_INT_EOP_TIMER) << S_MAC_TX_CH0) |
|
||||
|
Reference in New Issue
Block a user