diff options
author | Yuval Shaia <yuval.shaia.ml@gmail.com> | 2020-03-20 16:34:29 +0200 |
---|---|---|
committer | Marcel Apfelbaum <marcel.apfelbaum@gmail.com> | 2020-03-21 19:16:38 +0200 |
commit | b196d4f1d62dc0976fd3999ff753f94944fcb657 (patch) | |
tree | b9c8339b5577eed0dcde4dd0f92ccc6142d1cf00 /hw/rdma/rdma_backend.h | |
parent | f23601515b61ffe23398079cbfd6be0b9b99ec02 (diff) | |
download | qemu-b196d4f1d62dc0976fd3999ff753f94944fcb657.zip qemu-b196d4f1d62dc0976fd3999ff753f94944fcb657.tar.gz qemu-b196d4f1d62dc0976fd3999ff753f94944fcb657.tar.bz2 |
hw/rdma: Skip data-path mr_id translation
With the change made in commit 68b89aee71 ("Utilize ibv_reg_mr_iova for
memory registration") the MR emulation is no longer needed in order to
translate the guest addresses into host addresses.
With that, the next obvious step is to skip entirely the processing in
data-path.
To accomplish this, return the backend's lkey to driver so we will not
need to do the emulated mr_id to backend mr_id translation in data-path.
The function build_host_sge_array is still called in data-path but only
for backward computability with statistics collection.
While there, as a cosmetic change to make the code cleaner - make one
copy of the function rdma_backend_create_mr and leave the redundant
guest_start argument in the legacy code.
Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <20200320143429.9490-3-yuval.shaia.ml@gmail.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Diffstat (limited to 'hw/rdma/rdma_backend.h')
-rw-r--r-- | hw/rdma/rdma_backend.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/hw/rdma/rdma_backend.h b/hw/rdma/rdma_backend.h index 127f96e..225af48 100644 --- a/hw/rdma/rdma_backend.h +++ b/hw/rdma/rdma_backend.h @@ -78,13 +78,8 @@ int rdma_backend_query_port(RdmaBackendDev *backend_dev, int rdma_backend_create_pd(RdmaBackendDev *backend_dev, RdmaBackendPD *pd); void rdma_backend_destroy_pd(RdmaBackendPD *pd); -#ifdef LEGACY_RDMA_REG_MR -int rdma_backend_create_mr(RdmaBackendMR *mr, RdmaBackendPD *pd, void *addr, - size_t length, int access); -#else int rdma_backend_create_mr(RdmaBackendMR *mr, RdmaBackendPD *pd, void *addr, size_t length, uint64_t guest_start, int access); -#endif void rdma_backend_destroy_mr(RdmaBackendMR *mr); int rdma_backend_create_cq(RdmaBackendDev *backend_dev, RdmaBackendCQ *cq, |