Skip to content

Commit f46f344

Browse files
gobenjigregkh
authored andcommitted
mlx4: Invoke softirqs after napi_reschedule
[ Upstream commit bd4ce941c8d5b862b2f83364be5dbe8fc8ab48f8 ] 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 ec13ee8 ("virtio_net: invoke softirqs after __napi_schedule") and this patch applies the same fix to mlx4. Fixes: 07841f9 ("net/mlx4_en: Schedule napi when RX buffers allocation fails") Cc: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Acked-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0db2509 commit f46f344

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • drivers/net/ethernet/mellanox/mlx4

drivers/net/ethernet/mellanox/mlx4/en_rx.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,11 @@ void mlx4_en_recover_from_oom(struct mlx4_en_priv *priv)
502502
return;
503503

504504
for (ring = 0; ring < priv->rx_ring_num; ring++) {
505-
if (mlx4_en_is_ring_empty(priv->rx_ring[ring]))
505+
if (mlx4_en_is_ring_empty(priv->rx_ring[ring])) {
506+
local_bh_disable();
506507
napi_reschedule(&priv->rx_cq[ring]->napi);
508+
local_bh_enable();
509+
}
507510
}
508511
}
509512

0 commit comments

Comments
 (0)