From patchwork Wed Jan 17 13:52:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gurtovoy X-Patchwork-Id: 10169313 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 10690603B5 for ; Wed, 17 Jan 2018 13:53:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01C6D251F4 for ; Wed, 17 Jan 2018 13:53:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA16E28536; Wed, 17 Jan 2018 13:53:21 +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 9CB15251F4 for ; Wed, 17 Jan 2018 13:53:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753359AbeAQNxQ (ORCPT ); Wed, 17 Jan 2018 08:53:16 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:41846 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753015AbeAQNxC (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 w0HDqwxV021821; Wed, 17 Jan 2018 15:52:59 +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 4/4] IB/srpt: notify QP on Last WQE Reached event arrival Date: Wed, 17 Jan 2018 15:52:58 +0200 Message-Id: <1516197178-26493-5-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/infiniband/ulp/srpt/ib_srpt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index bfa576a..241c8eb 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -209,6 +209,7 @@ static void srpt_qp_event(struct ib_event *event, struct srpt_rdma_ch *ch) pr_debug("%s-%d, state %s: received Last WQE event.\n", ch->sess_name, ch->qp->qp_num, get_ch_state_name(ch->state)); + ib_notify_qp(ch->qp, event->event); break; default: pr_err("received unrecognized IB QP event %d\n", event->event);