Skip to content

Commit 9c29bcd

Browse files
edumazetdavem330
authored andcommitted
mlx5: remove ndo_poll_controller
As diagnosed by Song Liu, ndo_poll_controller() can be very dangerous on loaded hosts, since the cpu calling ndo_poll_controller() might steal all NAPI contexts (for all RX/TX queues of the NIC). This capture can last for unlimited amount of time, since one cpu is generally not able to drain all the queues under load. mlx5 uses NAPI for TX completions, so we better let core networking stack call the napi->poll() to avoid the capture. Signed-off-by: Eric Dumazet <[email protected]> Cc: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a24b66c commit 9c29bcd

File tree

1 file changed

+0
-19
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+0
-19
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4315,22 +4315,6 @@ static int mlx5e_xdp(struct net_device *dev, struct netdev_bpf *xdp)
43154315
}
43164316
}
43174317

4318-
#ifdef CONFIG_NET_POLL_CONTROLLER
4319-
/* Fake "interrupt" called by netpoll (eg netconsole) to send skbs without
4320-
* reenabling interrupts.
4321-
*/
4322-
static void mlx5e_netpoll(struct net_device *dev)
4323-
{
4324-
struct mlx5e_priv *priv = netdev_priv(dev);
4325-
struct mlx5e_channels *chs = &priv->channels;
4326-
4327-
int i;
4328-
4329-
for (i = 0; i < chs->num; i++)
4330-
napi_schedule(&chs->c[i]->napi);
4331-
}
4332-
#endif
4333-
43344318
static const struct net_device_ops mlx5e_netdev_ops = {
43354319
.ndo_open = mlx5e_open,
43364320
.ndo_stop = mlx5e_close,
@@ -4356,9 +4340,6 @@ static const struct net_device_ops mlx5e_netdev_ops = {
43564340
#ifdef CONFIG_MLX5_EN_ARFS
43574341
.ndo_rx_flow_steer = mlx5e_rx_flow_steer,
43584342
#endif
4359-
#ifdef CONFIG_NET_POLL_CONTROLLER
4360-
.ndo_poll_controller = mlx5e_netpoll,
4361-
#endif
43624343
#ifdef CONFIG_MLX5_ESWITCH
43634344
/* SRIOV E-Switch NDOs */
43644345
.ndo_set_vf_mac = mlx5e_set_vf_mac,

0 commit comments

Comments
 (0)