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_defs.h | |
parent | ff30a446b1d13373d35417d77d80b11cfde3fc6c (diff) | |
download | qemu-bf4414515b468c0a4ca69f1450bfe65418022955.zip |
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_defs.h')
-rw-r--r-- | hw/rdma/rdma_backend_defs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/rdma/rdma_backend_defs.h b/hw/rdma/rdma_backend_defs.h index a8c15b09ab..817153dc8c 100644 --- a/hw/rdma/rdma_backend_defs.h +++ b/hw/rdma/rdma_backend_defs.h @@ -26,7 +26,6 @@ typedef struct RdmaDeviceResources RdmaDeviceResources; typedef struct RdmaBackendThread { QemuThread thread; - QemuMutex mutex; bool run; /* Set by thread manager to let thread know it should exit */ bool is_running; /* Set by the thread to report its status */ } RdmaBackendThread; @@ -66,6 +65,7 @@ typedef struct RdmaBackendQP { struct ibv_pd *ibpd; struct ibv_qp *ibqp; uint8_t sgid_idx; + RdmaProtectedGSList cqe_ctx_list; } RdmaBackendQP; #endif |