net/mlx5e: Fix interoperability between XSK and ICOSQ recovery flow
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Tue, 12 Oct 2021 16:40:09 +0000 (19:40 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jan 2022 11:42:34 +0000 (12:42 +0100)
commit144dbcc1454660fba116994c49d0686421aae3c0
tree34220e8fb6605e1392f775310919ce7ee118946c
parent07f13d58a8ecc3baf9a488588fb38c5cb0db484f
net/mlx5e: Fix interoperability between XSK and ICOSQ recovery flow

[ Upstream commit 17958d7cd731b977ae7d4af38d891c3a1235b5f1 ]

Both regular RQ and XSKRQ use the same ICOSQ for UMRs. When doing
recovery for the ICOSQ, don't forget to deactivate XSKRQ.

XSK can be opened and closed while channels are active, so a new mutex
prevents the ICOSQ recovery from running at the same time. The ICOSQ
recovery deactivates and reactivates XSKRQ, so any parallel change in
XSK state would break consistency. As the regular RQ is running, it's
not enough to just flush the recovery work, because it can be
rescheduled.

Fixes: be5323c8379f ("net/mlx5e: Report and recover from CQE error on ICOSQ")
Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/health.h
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c