Commit 6a742feb authored by Benjamin Poirier's avatar Benjamin Poirier Committed by Ben Hutchings

mlx4: Invoke softirqs after napi_reschedule

[ Upstream commit bd4ce941 ]

mlx4 may schedule napi from a workqueue. Afterwards, softirqs are not run
in a deterministic time frame and the following message may be logged:
NOHZ: local_softirq_pending 08

The problem is the same as what was described in commit ec13ee80
("virtio_net: invoke softirqs after __napi_schedule") and this patch
applies the same fix to mlx4.

Fixes: 07841f9d ("net/mlx4_en: Schedule napi when RX buffers allocation fails")
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarBenjamin Poirier <bpoirier@suse.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 8bef2f57
...@@ -506,8 +506,11 @@ void mlx4_en_recover_from_oom(struct mlx4_en_priv *priv) ...@@ -506,8 +506,11 @@ void mlx4_en_recover_from_oom(struct mlx4_en_priv *priv)
return; return;
for (ring = 0; ring < priv->rx_ring_num; ring++) { for (ring = 0; ring < priv->rx_ring_num; ring++) {
if (mlx4_en_is_ring_empty(priv->rx_ring[ring])) if (mlx4_en_is_ring_empty(priv->rx_ring[ring])) {
local_bh_disable();
napi_reschedule(&priv->rx_cq[ring]->napi); napi_reschedule(&priv->rx_cq[ring]->napi);
local_bh_enable();
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment