diff options
author | Dragos Tatulea <dtatulea@nvidia.com> | 2023-10-18 20:14:51 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-11-01 16:19:57 +0300 |
commit | 625e4b59a923d2bb30759b88ecca34d12735fa7e (patch) | |
tree | 1247eed390a0eaa52a8261310687bb854797ec2e /mm/mmap.c | |
parent | 186e25387ed6f1403a1b464e31f5381ba4424681 (diff) | |
download | linux-625e4b59a923d2bb30759b88ecca34d12735fa7e.tar.xz |
vdpa/mlx5: Improve mr update flow
The current flow for updating an mr works directly on mvdev->mr which
makes it cumbersome to handle multiple new mr structs.
This patch makes the flow more straightforward by having
mlx5_vdpa_create_mr return a new mr which will update the old mr (if
any). The old mr will be deleted and unlinked from mvdev. For the case
when the iotlb is empty (not NULL), the old mr will be cleared.
This change paves the way for adding mrs for different ASIDs.
The initialized bool is no longer needed as mr is now a pointer in the
mlx5_vdpa_dev struct which will be NULL when not initialized.
Acked-by: Eugenio PĂ©rez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Message-Id: <20231018171456.1624030-14-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Tested-by: Si-Wei Liu <si-wei.liu@oracle.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Diffstat (limited to 'mm/mmap.c')
0 files changed, 0 insertions, 0 deletions