]> git.proxmox.com Git - mirror_qemu.git/commit - hw/rdma/rdma_backend.h
hw/rdma: Free all receive buffers when QP is destroyed
authorYuval Shaia <yuval.shaia@oracle.com>
Mon, 11 Mar 2019 10:29:11 +0000 (03:29 -0700)
committerMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
Sat, 16 Mar 2019 13:52:44 +0000 (15:52 +0200)
commitbf4414515b468c0a4ca69f1450bfe65418022955
treee0e2a604c711f0218376dd6285f638dfce85faaa
parentff30a446b1d13373d35417d77d80b11cfde3fc6c
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>
hw/rdma/rdma_backend.c
hw/rdma/rdma_backend.h
hw/rdma/rdma_backend_defs.h
hw/rdma/rdma_rm.c
hw/rdma/rdma_utils.c
hw/rdma/rdma_utils.h