diff options
author | Yuval Shaia <yuval.shaia@oracle.com> | 2019-03-11 03:29:11 -0700 |
---|---|---|
committer | Marcel Apfelbaum <marcel.apfelbaum@gmail.com> | 2019-03-16 15:52:44 +0200 |
commit | bf4414515b468c0a4ca69f1450bfe65418022955 (patch) | |
tree | e0e2a604c711f0218376dd6285f638dfce85faaa /hw/rdma/rdma_backend.h | |
parent | ff30a446b1d13373d35417d77d80b11cfde3fc6c (diff) | |
download | qemu-bf4414515b468c0a4ca69f1450bfe65418022955.zip qemu-bf4414515b468c0a4ca69f1450bfe65418022955.tar.gz qemu-bf4414515b468c0a4ca69f1450bfe65418022955.tar.bz2 |
hw/rdma: Free all receive buffers when QP is destroyed
When QP is destroyed the backend QP is destroyed as well. This ensures
we clean all received buffer we posted to it.
However, a contexts of these buffers are still remain in the device.
Fix it by maintaining a list of buffer's context and free them when QP
is destroyed.
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <1552300155-25216-8-git-send-email-yuval.shaia@oracle.com>
Reviewed-by: Kamal Heib <kamalheib1@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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/rdma/rdma_backend.h b/hw/rdma/rdma_backend.h index 8e53a72..c54eaf2 100644 --- a/hw/rdma/rdma_backend.h +++ b/hw/rdma/rdma_backend.h @@ -102,7 +102,7 @@ int rdma_backend_qp_state_rts(RdmaBackendQP *qp, uint8_t qp_type, uint32_t sq_psn, uint32_t qkey, bool use_qkey); int rdma_backend_query_qp(RdmaBackendQP *qp, struct ibv_qp_attr *attr, int attr_mask, struct ibv_qp_init_attr *init_attr); -void rdma_backend_destroy_qp(RdmaBackendQP *qp); +void rdma_backend_destroy_qp(RdmaBackendQP *qp, RdmaDeviceResources *dev_res); void rdma_backend_post_send(RdmaBackendDev *backend_dev, RdmaBackendQP *qp, uint8_t qp_type, |