Commit 73382e91 authored by Christian Marangi's avatar Christian Marangi Committed by Jakub Kicinski
Browse files

netdev: replace napi_reschedule with napi_schedule



Now that napi_schedule return a bool, we can drop napi_reschedule that
does the same exact function. The function comes from a very old commit
bfe13f54 ("ibm_emac: Convert to use napi_struct independent of struct
net_device") and the purpose is actually deprecated in favour of
different logic.

Convert every user of napi_reschedule to napi_schedule.

Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> # ath10k
Acked-by: Nick Child <nnac123@linux.ibm.com> # ibm
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for can/dev/rx-offload.c
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarTariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20231009133754.9834-3-ansuelsmth@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0a779003
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -488,7 +488,7 @@ int ipoib_rx_poll(struct napi_struct *napi, int budget)
		if (unlikely(ib_req_notify_cq(priv->recv_cq,
					      IB_CQ_NEXT_COMP |
					      IB_CQ_REPORT_MISSED_EVENTS)) &&
		    napi_reschedule(napi))
		    napi_schedule(napi))
			goto poll_more;
	}

@@ -518,7 +518,7 @@ int ipoib_tx_poll(struct napi_struct *napi, int budget)
		napi_complete(napi);
		if (unlikely(ib_req_notify_cq(priv->send_cq, IB_CQ_NEXT_COMP |
					      IB_CQ_REPORT_MISSED_EVENTS)) &&
		    napi_reschedule(napi))
		    napi_schedule(napi))
			goto poll_more;
	}
	return n < 0 ? 0 : n;
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ static int can_rx_offload_napi_poll(struct napi_struct *napi, int quota)

		/* Check if there was another interrupt */
		if (!skb_queue_empty(&offload->skb_queue))
			napi_reschedule(&offload->napi);
			napi_schedule(&offload->napi);
	}

	return work_done;
+1 −1
Original line number Diff line number Diff line
@@ -4261,7 +4261,7 @@ static void sge_rx_timer_cb(struct timer_list *t)

			if (fl_starving(adap, fl)) {
				rxq = container_of(fl, struct sge_eth_rxq, fl);
				if (napi_reschedule(&rxq->rspq.napi))
				if (napi_schedule(&rxq->rspq.napi))
					fl->starving++;
				else
					set_bit(id, s->starving_fl);
+1 −1
Original line number Diff line number Diff line
@@ -2094,7 +2094,7 @@ static void sge_rx_timer_cb(struct timer_list *t)
				struct sge_eth_rxq *rxq;

				rxq = container_of(fl, struct sge_eth_rxq, fl);
				if (napi_reschedule(&rxq->rspq.napi))
				if (napi_schedule(&rxq->rspq.napi))
					fl->starving++;
				else
					set_bit(id, s->starving_fl);
+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ static int nps_enet_poll(struct napi_struct *napi, int budget)
		 */
		if (nps_enet_is_tx_pending(priv)) {
			nps_enet_reg_set(priv, NPS_ENET_REG_BUF_INT_ENABLE, 0);
			napi_reschedule(napi);
			napi_schedule(napi);
		}
	}

Loading