[PATCH v4 04/15] vdpa/mlx5: support event qp reuse
Maxime Coquelin
maxime.coquelin at redhat.com
Mon Jun 20 10:27:53 CEST 2022
On 6/18/22 11:02, Li Zhang wrote:
> From: Yajun Wu <yajunw at nvidia.com>
>
> To speed up queue create time, event qp and cq will create only once.
> Each virtq creation will reuse same event qp and cq.
>
> Because FW will set event qp to error state during virtq destroy,
> need modify event qp to RESET state, then modify qp to RTS state as
> usual. This can save about 1.5ms for each virtq creation.
>
> After SW qp reset, qp pi/ci all become 0 while cq pi/ci keep as
> previous. Add new variable qp_ci to save SW qp ci. Move qp pi
> independently with cq ci.
>
> Add new function mlx5_vdpa_drain_cq to drain cq CQE after virtq
> release.
>
> Signed-off-by: Yajun Wu <yajunw at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>
> ---
> drivers/vdpa/mlx5/mlx5_vdpa.c | 8 ++++
> drivers/vdpa/mlx5/mlx5_vdpa.h | 12 +++++-
> drivers/vdpa/mlx5/mlx5_vdpa_event.c | 60 +++++++++++++++++++++++++++--
> drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 6 +--
> 4 files changed, 78 insertions(+), 8 deletions(-)
>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Thanks,
Maxime
More information about the dev
mailing list