net/mlx5: fix aging queue doorbell ringing
authorDekel Peled <dekelp@nvidia.com>
Tue, 3 Nov 2020 10:38:04 +0000 (12:38 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 15:26:54 +0000 (16:26 +0100)
commit105d2149657bedb4545970b93bca15163ba3754c
tree77f092f2964205deff20df1e751fa5ccad381d38
parentebda282cbb1066af2e2c14770bb36572ecf6ba95
net/mlx5: fix aging queue doorbell ringing

Recent patch introduced a new SQ for ASO flow hit management.
This SQ uses two WQEBB's for each WQE.
The SQ producer index is 16 bits wide.

The enqueue loop posts new WQEs to the ASO SQ, using WQE index for
the SQ management.
This 16 bits index multiplied by 2 was wrongly used also for SQ
doorbell ringing.
The multiplication caused the SW index overlapping to be out of sync
with the hardware index, causing it to get stuck.

This patch separates the WQE index management from the doorbell index
management.
So, for each WQE index incrementation by 1, the doorbell index is
incremented by 2.

Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/common/mlx5/mlx5_prm.h
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_flow_age.c