vdpa/mlx5: Create direct MKEYs in parallel
authorDragos Tatulea <dtatulea@nvidia.com>
Fri, 30 Aug 2024 10:58:32 +0000 (13:58 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 25 Sep 2024 11:07:43 +0000 (07:07 -0400)
commit0071b138d44af4296bf871e6624369ce697b4b15
treec934f659129114969fe689d4bcb9d7e1774a82eb
parentdb0a314f845abf9572d5826f4cfdecb93b838952
vdpa/mlx5: Create direct MKEYs in parallel

Use the async interface to issue MTT MKEY creation.
Extra care is taken at the allocation of FW input commands
due to the MTT tables having variable sizes depending on
MR.

The indirect MKEY is still created synchronously at the
end as the direct MKEYs need to be filled in.

This makes create_user_mr() 3-5x faster, depending on
the size of the MR.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Message-Id: <20240830105838.2666587-3-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/mlx5/core/mr.c