]> git.droids-corp.org - dpdk.git/commit
vdpa/mlx5: add task ring for multi-thread management
authorLi Zhang <lizh@nvidia.com>
Sat, 18 Jun 2022 09:02:52 +0000 (12:02 +0300)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Tue, 21 Jun 2022 09:18:15 +0000 (11:18 +0200)
commit69e07f43a226499cf1ede5629616b251dae27734
tree6937f74d39b8374f13326633f67d183f6f3dce64
parent67b070936d6fbbcb1918f73f9bd1d684ca707b23
vdpa/mlx5: add task ring for multi-thread management

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@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/vdpa/mlx5/mlx5_vdpa.h
drivers/vdpa/mlx5/mlx5_vdpa_cthread.c