]> www.infradead.org Git - users/hch/block.git/commit
vfio/mlx5: Rewrite create mkey flow to allow better code reuse
authorLeon Romanovsky <leonro@nvidia.com>
Sun, 21 Apr 2024 13:23:02 +0000 (16:23 +0300)
committerLeon Romanovsky <leon@kernel.org>
Thu, 3 Oct 2024 16:05:53 +0000 (19:05 +0300)
commit3a358bd10e8d4cfd48e738352b2cf99aa0569d08
tree50900a7a79d5b2e18b62a1429ed63f4f6d34008a
parent1f8b30263db5231fae67fff0f7e947d511e0dc4f
vfio/mlx5: Rewrite create mkey flow to allow better code reuse

Change the creation of mkey to be performed in multiple steps:
data allocation, DMA setup and actual call to HW to create that mkey.

In this new flow, the whole input to MKEY command is saved to eliminate
the need to keep array of pointers for DMA addresses for receive list
and in the future patches for send list too.

In addition to memory size reduce and elimination of unnecessary data
movements to set MKEY input, the code is prepared for future reuse.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/vfio/pci/mlx5/cmd.c
drivers/vfio/pci/mlx5/cmd.h