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 <l...@nvidia.com>
Acked-by: Matan Azrad <ma...@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.coque...@redhat.com>

Thanks,
Maxime

Reply via email to