* [PATCH net-next] mlx4: use napi_schedule_irqoff()
@ 2014-10-29 23:54 Eric Dumazet
2014-10-30 7:30 ` Amir Vadai
2014-10-30 20:50 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2014-10-29 23:54 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Amir Vadai
From: Eric Dumazet <edumazet@google.com>
mlx4_en_rx_irq() and mlx4_en_tx_irq() run from hard interrupt context.
They can use napi_schedule_irqoff() instead of napi_schedule()
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 4 ++--
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index c8e75dab80553c876b195361456fb49587231055..c562c1468944f9ad4319e5faaf19bf9e66d15eaf 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -878,8 +878,8 @@ void mlx4_en_rx_irq(struct mlx4_cq *mcq)
struct mlx4_en_cq *cq = container_of(mcq, struct mlx4_en_cq, mcq);
struct mlx4_en_priv *priv = netdev_priv(cq->dev);
- if (priv->port_up)
- napi_schedule(&cq->napi);
+ if (likely(priv->port_up))
+ napi_schedule_irqoff(&cq->napi);
else
mlx4_en_arm_cq(priv, cq);
}
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index 34c137878545fc672dad1a3d86e11c034c0ac368..5c4062921cdf46f1a7021a39705275c33ca4de77 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -479,8 +479,8 @@ void mlx4_en_tx_irq(struct mlx4_cq *mcq)
struct mlx4_en_cq *cq = container_of(mcq, struct mlx4_en_cq, mcq);
struct mlx4_en_priv *priv = netdev_priv(cq->dev);
- if (priv->port_up)
- napi_schedule(&cq->napi);
+ if (likely(priv->port_up))
+ napi_schedule_irqoff(&cq->napi);
else
mlx4_en_arm_cq(priv, cq);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] mlx4: use napi_schedule_irqoff()
2014-10-29 23:54 [PATCH net-next] mlx4: use napi_schedule_irqoff() Eric Dumazet
@ 2014-10-30 7:30 ` Amir Vadai
2014-10-30 20:50 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Amir Vadai @ 2014-10-30 7:30 UTC (permalink / raw)
To: Eric Dumazet, David Miller; +Cc: netdev
On 10/30/2014 1:54 AM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> mlx4_en_rx_irq() and mlx4_en_tx_irq() run from hard interrupt context.
>
> They can use napi_schedule_irqoff() instead of napi_schedule()
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
> drivers/net/ethernet/mellanox/mlx4/en_rx.c | 4 ++--
> drivers/net/ethernet/mellanox/mlx4/en_tx.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
Acked-By: Amir Vadai <amirv@mellanox.com>
Thanks,
Amir
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] mlx4: use napi_schedule_irqoff()
2014-10-29 23:54 [PATCH net-next] mlx4: use napi_schedule_irqoff() Eric Dumazet
2014-10-30 7:30 ` Amir Vadai
@ 2014-10-30 20:50 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-10-30 20:50 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, amirv
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 29 Oct 2014 16:54:45 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> mlx4_en_rx_irq() and mlx4_en_tx_irq() run from hard interrupt context.
>
> They can use napi_schedule_irqoff() instead of napi_schedule()
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-30 20:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-29 23:54 [PATCH net-next] mlx4: use napi_schedule_irqoff() Eric Dumazet
2014-10-30 7:30 ` Amir Vadai
2014-10-30 20:50 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).