From patchwork Wed Jan 17 13:52:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gurtovoy X-Patchwork-Id: 10169311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B69CB60580 for ; Wed, 17 Jan 2018 13:53:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A565D251F4 for ; Wed, 17 Jan 2018 13:53:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A48328536; Wed, 17 Jan 2018 13:53:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5111428450 for ; Wed, 17 Jan 2018 13:53:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752999AbeAQNxQ (ORCPT ); Wed, 17 Jan 2018 08:53:16 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:41816 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752976AbeAQNxC (ORCPT ); Wed, 17 Jan 2018 08:53:02 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from maxg@mellanox.com) with ESMTPS (AES256-SHA encrypted); 17 Jan 2018 15:52:59 +0200 Received: from r-vnc08.mtr.labs.mlnx (r-vnc08.mtr.labs.mlnx [10.208.0.121]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w0HDqwxT021821; Wed, 17 Jan 2018 15:52:58 +0200 From: Max Gurtovoy To: jgg@mellanox.com, dledford@redhat.com, linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, sagi@grimberg.me, bart.vanassche@wdc.com, hch@lst.de Cc: danielm@mellanox.com, Max Gurtovoy Subject: [PATCH 2/4] nvmet-rdma: notify QP on Last WQE Reached event arrival Date: Wed, 17 Jan 2018 15:52:56 +0200 Message-Id: <1516197178-26493-3-git-send-email-maxg@mellanox.com> X-Mailer: git-send-email 1.7.8.2 In-Reply-To: <1516197178-26493-1-git-send-email-maxg@mellanox.com> References: <1516197178-26493-1-git-send-email-maxg@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In order to avoid resource leakage for QP associated with a Shared Receive Queue (SRQ), notify it on Last WQE Reached event arrival. Signed-off-by: Max Gurtovoy --- drivers/nvme/target/rdma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c index 4991290..99a14a7 100644 --- a/drivers/nvme/target/rdma.c +++ b/drivers/nvme/target/rdma.c @@ -1151,6 +1151,9 @@ static void nvmet_rdma_qp_event(struct ib_event *event, void *priv) case IB_EVENT_COMM_EST: rdma_notify(queue->cm_id, event->event); break; + case IB_EVENT_QP_LAST_WQE_REACHED: + ib_notify_qp(queue->cm_id->qp, event->event); + break; default: pr_err("received IB QP event: %s (%d)\n", ib_event_msg(event->event), event->event);