]> git.droids-corp.org - dpdk.git/commit
vdpa/mlx5: optimize datapath-control synchronization
authorLi Zhang <lizh@nvidia.com>
Sat, 18 Jun 2022 09:02:50 +0000 (12:02 +0300)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Tue, 21 Jun 2022 09:18:15 +0000 (11:18 +0200)
commit057f7d20849907f55bcb8a7b51014805ffa26265
tree48af731cace253fe72918047d389c1c31303bd08
parent7f2de21244e2c7754a1510e6cc43a9a9526ef316
vdpa/mlx5: optimize datapath-control synchronization

The driver used a single global lock for any synchronization
needed for the datapath and control path.
It is better to group the critical sections with
the other ones that should be synchronized.

Replace the global lock with the following locks:

1.virtq locks(per virtq) synchronize datapath polling and
  parallel configurations on the same virtq.
2.A doorbell lock synchronizes doorbell update,
  which is shared for all the virtqs in the device.
3.A steering lock for the shared steering objects updates.

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.c
drivers/vdpa/mlx5/mlx5_vdpa.h
drivers/vdpa/mlx5/mlx5_vdpa_event.c
drivers/vdpa/mlx5/mlx5_vdpa_lm.c
drivers/vdpa/mlx5/mlx5_vdpa_steer.c
drivers/vdpa/mlx5/mlx5_vdpa_virtq.c