]> git.openfabrics.org - ~emulex/libocrdma.git/commitdiff
RDMA/libocrdma: un-map cqe memory in destroy_cq
authorDevesh Sharma <devesh.sharma@emulex.com>
Wed, 29 Jan 2014 10:53:17 +0000 (16:23 +0530)
committerDevesh Sharma <devesh.sharma@emulex.com>
Wed, 29 Jan 2014 10:53:17 +0000 (16:23 +0530)
while calling detroy cq, the host memory used to hold CQEs
needs to be unmapped.

Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
src/ocrdma_verbs.c

index acf460f6988326e832d9d0e13abf40ccb0243737..96c5f78b4ce8940f74b21627591d8313fffaa045 100644 (file)
@@ -356,9 +356,13 @@ int ocrdma_resize_cq(struct ibv_cq *ibcq, int new_entries)
 int ocrdma_destroy_cq(struct ibv_cq *ibv_cq)
 {
        struct ocrdma_cq *cq = get_ocrdma_cq(ibv_cq);
+
        ibv_cmd_destroy_cq(ibv_cq);
        if (cq->db_va)
                munmap((void *)cq->db_va, cq->db_size);
+       if (cq->va)
+               munmap((void*)cq->va, cq->cq_mem_size);
+
        free(cq);
        return 0;
 }