]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mlx4: use napi_schedule_irqoff()
authorEric Dumazet <edumazet@google.com>
Wed, 29 Oct 2014 23:54:45 +0000 (16:54 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Oct 2014 20:50:47 +0000 (16:50 -0400)
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>
Acked-By: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/en_tx.c

index c8e75dab80553c876b195361456fb49587231055..c562c1468944f9ad4319e5faaf19bf9e66d15eaf 100644 (file)
@@ -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);
 }
index 34c137878545fc672dad1a3d86e11c034c0ac368..5c4062921cdf46f1a7021a39705275c33ca4de77 100644 (file)
@@ -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);
 }