diff mbox series

[net-next,2/2] nfp: use napi_schedule_irq()

Message ID 20210514222402.295157-2-kuba@kernel.org
State New
Headers show
Series [net-next,1/2] net: add a napi variant for RT-well-behaved drivers | expand

Commit Message

Jakub Kicinski May 14, 2021, 10:24 p.m. UTC
NFP uses MSI-X and has the most trivial IRQ handler possible.
Perfect candidate for napi_schedule_irq().

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Simon Horman May 17, 2021, 9:48 a.m. UTC | #1
On Fri, May 14, 2021 at 03:24:02PM -0700, Jakub Kicinski wrote:
> NFP uses MSI-X and has the most trivial IRQ handler possible.

> Perfect candidate for napi_schedule_irq().

> 

> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

> ---

>  drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 6 +++---

>  1 file changed, 3 insertions(+), 3 deletions(-)



I understand there is some discussion around the merit of PATCH 1/2.
But if that approach is accepted then this patch looks good to me.

Reviewed-by: Simon Horman <simon.horman@netronome.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index eeb30680b4dc..12222a6bb08a 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -474,7 +474,7 @@  static irqreturn_t nfp_net_irq_rxtx(int irq, void *data)
 {
 	struct nfp_net_r_vector *r_vec = data;
 
-	napi_schedule_irqoff(&r_vec->napi);
+	napi_schedule_irq(&r_vec->napi);
 
 	/* The FW auto-masks any interrupt, either via the MASK bit in
 	 * the MSI-X table or via the per entry ICR field.  So there
@@ -2631,8 +2631,8 @@  nfp_net_prepare_vector(struct nfp_net *nn, struct nfp_net_r_vector *r_vec,
 
 	snprintf(r_vec->name, sizeof(r_vec->name),
 		 "%s-rxtx-%d", nfp_net_name(nn), idx);
-	err = request_irq(r_vec->irq_vector, r_vec->handler, 0, r_vec->name,
-			  r_vec);
+	err = request_irq(r_vec->irq_vector, r_vec->handler, IRQF_NO_THREAD,
+			  r_vec->name, r_vec);
 	if (err) {
 		if (nn->dp.netdev)
 			netif_napi_del(&r_vec->napi);