diff options
author | Eric Dumazet <edumazet@google.com> | 2017-01-30 08:22:01 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-30 15:10:42 -0500 |
commit | 6ad20165d376fa07919a70e4f43dfae564601829 (patch) | |
tree | d5cc7d8d041321af6ea83b053bedd47a73e639fb /drivers/net/can | |
parent | 63a6fff353d01da5a22b72670c434bf12fa0e3b8 (diff) | |
download | linux-6ad20165d376fa07919a70e4f43dfae564601829.tar.gz linux-6ad20165d376fa07919a70e4f43dfae564601829.tar.bz2 linux-6ad20165d376fa07919a70e4f43dfae564601829.zip |
drivers: net: generalize napi_complete_done()
napi_complete_done() allows to opt-in for gro_flush_timeout,
added back in linux-3.19, commit 3b47d30396ba
("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>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/at91_can.c | 2 | ||||
-rw-r--r-- | drivers/net/can/c_can/c_can.c | 2 | ||||
-rw-r--r-- | drivers/net/can/flexcan.c | 2 | ||||
-rw-r--r-- | drivers/net/can/ifi_canfd/ifi_canfd.c | 2 | ||||
-rw-r--r-- | drivers/net/can/janz-ican3.c | 2 | ||||
-rw-r--r-- | drivers/net/can/m_can/m_can.c | 2 | ||||
-rw-r--r-- | drivers/net/can/rcar/rcar_can.c | 2 | ||||
-rw-r--r-- | drivers/net/can/rcar/rcar_canfd.c | 2 | ||||
-rw-r--r-- | drivers/net/can/xilinx_can.c | 2 |
9 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c index 8f5e93cb7975..0e0df0ba288c 100644 --- a/drivers/net/can/at91_can.c +++ b/drivers/net/can/at91_can.c @@ -813,7 +813,7 @@ static int at91_poll(struct napi_struct *napi, int quota) u32 reg_ier = AT91_IRQ_ERR_FRAME; reg_ier |= get_irq_mb_rx(priv) & ~AT91_MB_MASK(priv->rx_next); - napi_complete(napi); + napi_complete_done(napi, work_done); at91_write(priv, AT91_IER, reg_ier); } diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c index e3dccd3200d5..606b7d8ffe13 100644 --- a/drivers/net/can/c_can/c_can.c +++ b/drivers/net/can/c_can/c_can.c @@ -1070,7 +1070,7 @@ static int c_can_poll(struct napi_struct *napi, int quota) end: if (work_done < quota) { - napi_complete(napi); + napi_complete_done(napi, work_done); /* enable all IRQs if we are not in bus off state */ if (priv->can.state != CAN_STATE_BUS_OFF) c_can_irq_control(priv, true); diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 16f7cadda5c3..43cfce8b076b 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -703,7 +703,7 @@ static int flexcan_poll(struct napi_struct *napi, int quota) work_done += flexcan_poll_bus_err(dev, reg_esr); if (work_done < quota) { - napi_complete(napi); + napi_complete_done(napi, work_done); /* enable IRQs */ flexcan_write(FLEXCAN_IFLAG_DEFAULT, ®s->imask1); flexcan_write(priv->reg_ctrl_default, ®s->ctrl); diff --git a/drivers/net/can/ifi_canfd/ifi_canfd.c b/drivers/net/can/ifi_canfd/ifi_canfd.c index 368bb0710d8f..138f5ae75c0b 100644 --- a/drivers/net/can/ifi_canfd/ifi_canfd.c +++ b/drivers/net/can/ifi_canfd/ifi_canfd.c @@ -578,7 +578,7 @@ static int ifi_canfd_poll(struct napi_struct *napi, int quota) work_done += ifi_canfd_do_rx_poll(ndev, quota - work_done); if (work_done < quota) { - napi_complete(napi); + napi_complete_done(napi, work_done); ifi_canfd_irq_enable(ndev, 1); } diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c index f13bb8d9bb84..2ba1a81500c1 100644 --- a/drivers/net/can/janz-ican3.c +++ b/drivers/net/can/janz-ican3.c @@ -1475,7 +1475,7 @@ static int ican3_napi(struct napi_struct *napi, int budget) /* We have processed all packets that the adapter had, but it * was less than our budget, stop polling */ if (received < budget) - napi_complete(napi); + napi_complete_done(napi, received); spin_lock_irqsave(&mod->lock, flags); diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 195f15edb32e..7a6554efd42b 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -730,7 +730,7 @@ static int m_can_poll(struct napi_struct *napi, int quota) work_done += m_can_do_rx_poll(dev, (quota - work_done)); if (work_done < quota) { - napi_complete(napi); + napi_complete_done(napi, work_done); m_can_enable_all_interrupts(priv); } diff --git a/drivers/net/can/rcar/rcar_can.c b/drivers/net/can/rcar/rcar_can.c index 788459f6bf5c..caed4e6960f8 100644 --- a/drivers/net/can/rcar/rcar_can.c +++ b/drivers/net/can/rcar/rcar_can.c @@ -695,7 +695,7 @@ static int rcar_can_rx_poll(struct napi_struct *napi, int quota) } /* All packets processed */ if (num_pkts < quota) { - napi_complete(napi); + napi_complete_done(napi, num_pkts); priv->ier |= RCAR_CAN_IER_RXFIE; writeb(priv->ier, &priv->regs->ier); } diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c index 43cdd5544b0c..4ef07d97156d 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -1512,7 +1512,7 @@ static int rcar_canfd_rx_poll(struct napi_struct *napi, int quota) /* All packets processed */ if (num_pkts < quota) { - napi_complete(napi); + napi_complete_done(napi, num_pkts); /* Enable Rx FIFO interrupts */ rcar_canfd_set_bit(priv->base, RCANFD_RFCC(ridx), RCANFD_RFCC_RFIE); diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index c71a03593595..89aec07c225f 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -726,7 +726,7 @@ static int xcan_rx_poll(struct napi_struct *napi, int quota) can_led_event(ndev, CAN_LED_EVENT_RX); if (work_done < quota) { - napi_complete(napi); + napi_complete_done(napi, work_done); ier = priv->read_reg(priv, XCAN_IER_OFFSET); ier |= (XCAN_IXR_RXOK_MASK | XCAN_IXR_RXNEMP_MASK); priv->write_reg(priv, XCAN_IER_OFFSET, ier); |