diff options
author | Dragos Tatulea <dtatulea@nvidia.com> | 2023-04-24 18:19:00 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-07-26 14:31:04 -0700 |
commit | 39646d9bcd1a65d2396328026626859a1dab59d7 (patch) | |
tree | b9f95675b3b73ec5aa1082f6e90d138c4fe33f61 /drivers/net/ethernet/litex | |
parent | e0f52298fee449fec37e3e3c32df60008b509b16 (diff) | |
download | linux-39646d9bcd1a65d2396328026626859a1dab59d7.tar.gz linux-39646d9bcd1a65d2396328026626859a1dab59d7.tar.bz2 linux-39646d9bcd1a65d2396328026626859a1dab59d7.zip |
net/mlx5e: xsk: Fix crash on regular rq reactivation
When the regular rq is reactivated after the XSK socket is closed
it could be reading stale cqes which eventually corrupts the rq.
This leads to no more traffic being received on the regular rq and a
crash on the next close or deactivation of the rq.
Kal Cuttler Conely reported this issue as a crash on the release
path when the xdpsock sample program is stopped (killed) and restarted
in sequence while traffic is running.
This patch flushes all cqes when during the rq flush. The cqe flushing
is done in the reset state of the rq. mlx5e_rq_to_ready code is moved
into the flush function to allow for this.
Fixes: 082a9edf12fe ("net/mlx5e: xsk: Flush RQ on XSK activation to save memory")
Reported-by: Kal Cutter Conley <kal.conley@dectris.com>
Closes: https://lore.kernel.org/xdp-newbies/CAHApi-nUAs4TeFWUDV915CZJo07XVg2Vp63-no7UDfj6wur9nQ@mail.gmail.com
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/litex')
0 files changed, 0 insertions, 0 deletions