]> www.infradead.org Git - users/hch/misc.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)
committerChristoph Hellwig <hch@lst.de>
Wed, 23 Oct 2024 16:45:23 +0000 (18:45 +0200)
commit68d924848ee98ff8c351a89ff6fca022ba3046a2
tree6aa035b5e5b258c2b1c653a9dfb1e47a982fe441
parent193861df6a82ab271106c8cf392f4fc36f41549c
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