From patchwork Tue Feb 27 20:56:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nikolova, Tatyana E" X-Patchwork-Id: 10246055 X-Patchwork-Delegate: leon@leon.nu 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 48D5E6055B for ; Tue, 27 Feb 2018 20:56:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39BE827C2D for ; Tue, 27 Feb 2018 20:56:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E08B28927; Tue, 27 Feb 2018 20:56:52 +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 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 CAFD728A85 for ; Tue, 27 Feb 2018 20:56:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751550AbeB0U4u (ORCPT ); Tue, 27 Feb 2018 15:56:50 -0500 Received: from mga12.intel.com ([192.55.52.136]:64752 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751827AbeB0U4t (ORCPT ); Tue, 27 Feb 2018 15:56:49 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2018 12:56:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,402,1515484800"; d="scan'208";a="207533875" Received: from tenikolo-mobl.amr.corp.intel.com ([10.122.41.83]) by fmsmga006.fm.intel.com with ESMTP; 27 Feb 2018 12:56:48 -0800 From: Tatyana Nikolova To: jgg@mellanox.com, dledford@redhat.com, leonro@mellanox.com Cc: nmoreychaisemartin@suse.de, linux-rdma@vger.kernel.org, e1000-rdma@lists.sourceforge.net Subject: [PATCH rdma-core 2/2] providers/i40iw: Skip CQEs for destroyed QP Date: Tue, 27 Feb 2018 14:56:33 -0600 Message-Id: <20180227205633.8292-3-tatyana.e.nikolova@intel.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180227205633.8292-1-tatyana.e.nikolova@intel.com> References: <20180227205633.8292-1-tatyana.e.nikolova@intel.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 Currently CQ poll returns an error if the QP associated with a CQE is destroyed although there can be more CQEs for other QPs which are still active. Fix this by skipping the CQE for the destroyed QP and continue with CQE processing. The patch is similar to driver commit f8a4e76c75e5 ("RDMA/i40iw: Fix for checking if the QP is destroyed") Fixes: faf6782ac8bc ("libi40iw: Initial public release of libi40iw-0.5.223") Reported-by: Andrew Boyer Signed-off-by: Tatyana Nikolova --- providers/i40iw/i40iw_uverbs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/providers/i40iw/i40iw_uverbs.c b/providers/i40iw/i40iw_uverbs.c index bb3cfd43..d77a4691 100644 --- a/providers/i40iw/i40iw_uverbs.c +++ b/providers/i40iw/i40iw_uverbs.c @@ -342,6 +342,8 @@ int i40iw_upoll_cq(struct ibv_cq *cq, int num_entries, struct ibv_wc *entry) ret = iwucq->cq.ops.iw_cq_poll_completion(&iwucq->cq, &cq_poll_info); if (ret == I40IW_ERR_QUEUE_EMPTY) { break; + } else if (ret == I40IW_ERR_QUEUE_DESTROYED) { + continue; } else if (ret) { fprintf(stderr, PFX "%s: Error polling CQ, status %d\n", __func__, ret); if (!cqe_count)