From patchwork Fri Feb 21 05:31:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devesh Sharma X-Patchwork-Id: 3693821 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B9259BF13A for ; Fri, 21 Feb 2014 06:00:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F114520149 for ; Fri, 21 Feb 2014 06:00:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CE0420142 for ; Fri, 21 Feb 2014 06:00:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752514AbaBUGAo (ORCPT ); Fri, 21 Feb 2014 01:00:44 -0500 Received: from cmexedge1.ext.emulex.com ([138.239.224.99]:11148 "EHLO CMEXEDGE1.ext.emulex.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752468AbaBUGAo (ORCPT ); Fri, 21 Feb 2014 01:00:44 -0500 Received: from CMEXHTCAS2.ad.emulex.com (138.239.115.218) by CMEXEDGE1.ext.emulex.com (138.239.224.99) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 20 Feb 2014 22:01:41 -0800 Received: from neo01.lab.bg.emulex.com (10.192.204.8) by smtp.emulex.com (138.239.115.208) with Microsoft SMTP Server id 14.3.174.1; Thu, 20 Feb 2014 22:00:43 -0800 From: To: Subject: [PATCH 3/4] RDMA/libocrdma: un-map cqe memory in destroy_cq Date: Fri, 21 Feb 2014 11:01:43 +0530 Message-ID: <1392960704-10871-3-git-send-email-devesh.sharma@emulex.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1392960704-10871-1-git-send-email-devesh.sharma@emulex.com> References: <1392960704-10871-1-git-send-email-devesh.sharma@emulex.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Devesh Sharma while calling detroy cq, the host memory used to hold CQEs needs to be unmapped. Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier --- src/ocrdma_verbs.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/ocrdma_verbs.c b/src/ocrdma_verbs.c index acf460f..96c5f78 100644 --- a/src/ocrdma_verbs.c +++ b/src/ocrdma_verbs.c @@ -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; }