]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Don't trigger IRQ multiple times on XSK wakeup to avoid WQ overruns
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Tue, 11 Feb 2020 14:02:35 +0000 (16:02 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 20 Apr 2020 21:30:22 +0000 (14:30 -0700)
commit125f738dd4102ebd71f6bdbf969e25a50517b797
tree2a3c111b8ca48478db96e1e7073eb97e864a88a6
parenteca2810b3d30562f261e2ef8f0e7c7af75d23b80
net/mlx5e: Don't trigger IRQ multiple times on XSK wakeup to avoid WQ overruns

XSK wakeup function triggers NAPI by posting a NOP WQE to a special XSK
ICOSQ. When the application floods the driver with wakeup requests by
calling sendto() in a certain pattern that ends up in mlx5e_trigger_irq,
the XSK ICOSQ may overflow.

Multiple NOPs are not required and won't accelerate the process, so
avoid posting a second NOP if there is one already on the way. This way
we also avoid increasing the queue size (which might not help anyway).

Fixes: 40e89241b3e0 ("net/mlx5e: Add XSK zero-copy support")
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/tx.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c