[PATCH v4 09/15] vdpa/mlx5: add task ring for MT management

Maxime Coquelin maxime.coquelin at redhat.com
Mon Jun 20 17:05:08 CEST 2022



On 6/18/22 11:02, Li Zhang wrote:
> The configuration threads tasks need a container to
> support multiple tasks assigned to a thread in parallel.
> Use rte_ring container per thread to manage
> the thread tasks without locks.
> The caller thread from the user context opens a task to
> a thread and enqueue it to the thread ring.
> The thread polls its ring and dequeue tasks.
> That’s why the ring should be in multi-producer
> and single consumer mode.
> Anatomic counter manages the tasks completion notification.
> The threads report errors to the caller by
> a dedicated error counter per task.
> 
> Signed-off-by: Li Zhang <lizh at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>
> ---
>   drivers/vdpa/mlx5/mlx5_vdpa.h         |  17 ++++
>   drivers/vdpa/mlx5/mlx5_vdpa_cthread.c | 115 +++++++++++++++++++++++++-
>   2 files changed, 130 insertions(+), 2 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime



More information about the dev mailing list