aboutsummaryrefslogtreecommitdiff
path: root/hw/rdma/rdma_rm.c
diff options
context:
space:
mode:
authorYuval Shaia <yuval.shaia@oracle.com>2018-08-05 18:35:11 +0300
committerMarcel Apfelbaum <marcel.apfelbaum@gmail.com>2018-08-18 18:00:06 +0300
commit7f99daadbddfee16f3ee77c413bd4a34366a3dad (patch)
treef50716e1c6b36682c7f696c60453ea1b5d6b5918 /hw/rdma/rdma_rm.c
parent6e7dba23af1a8f30eac42022cfb94d8693ed20e2 (diff)
hw/rdma: Delete useless structure RdmaRmUserMR
The structure RdmaRmUserMR has no benefits, remove it an move all its fields to struct RdmaRmMR. Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Message-Id: <20180805153518.2983-7-yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Diffstat (limited to 'hw/rdma/rdma_rm.c')
-rw-r--r--hw/rdma/rdma_rm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c
index 415da15efe..7403d24674 100644
--- a/hw/rdma/rdma_rm.c
+++ b/hw/rdma/rdma_rm.c
@@ -165,15 +165,15 @@ int rdma_rm_alloc_mr(RdmaDeviceResources *dev_res, uint32_t pd_handle,
length = TARGET_PAGE_SIZE;
addr = g_malloc(length);
} else {
- mr->user_mr.host_virt = host_virt;
- pr_dbg("host_virt=0x%p\n", mr->user_mr.host_virt);
- mr->user_mr.length = guest_length;
+ mr->virt = host_virt;
+ pr_dbg("host_virt=0x%p\n", mr->virt);
+ mr->length = guest_length;
pr_dbg("length=%zu\n", guest_length);
- mr->user_mr.guest_start = guest_start;
- pr_dbg("guest_start=0x%" PRIx64 "\n", mr->user_mr.guest_start);
+ mr->start = guest_start;
+ pr_dbg("guest_start=0x%" PRIx64 "\n", mr->start);
- length = mr->user_mr.length;
- addr = mr->user_mr.host_virt;
+ length = mr->length;
+ addr = mr->virt;
}
ret = rdma_backend_create_mr(&mr->backend_mr, &pd->backend_pd, addr, length,
@@ -214,7 +214,7 @@ void rdma_rm_dealloc_mr(RdmaDeviceResources *dev_res, uint32_t mr_handle)
if (mr) {
rdma_backend_destroy_mr(&mr->backend_mr);
- munmap(mr->user_mr.host_virt, mr->user_mr.length);
+ munmap(mr->virt, mr->length);
res_tbl_dealloc(&dev_res->mr_tbl, mr_handle);
}
}