Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ad20165 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

drivers: net: generalize napi_complete_done()



napi_complete_done() allows to opt-in for gro_flush_timeout,
added back in linux-3.19, commit 3b47d303
("net: gro: add a per device gro flush timer")

This allows for more efficient GRO aggregation without
sacrifying latencies.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 63a6fff3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}

+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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, &regs->imask1);
		flexcan_write(priv->reg_ctrl_default, &regs->ctrl);
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}

+1 −1
Original line number Diff line number Diff line
@@ -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);

Loading