From patchwork Tue Mar 30 22:24:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Campbell X-Patchwork-Id: 89426 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2UMO7w1015651 for ; Tue, 30 Mar 2010 22:24:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753032Ab0C3WYH (ORCPT ); Tue, 30 Mar 2010 18:24:07 -0400 Received: from avexch1.qlogic.com ([198.70.193.115]:46765 "EHLO avexch1.qlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750938Ab0C3WYG (ORCPT ); Tue, 30 Mar 2010 18:24:06 -0400 Received: from avexcashub1.qlogic.org ([10.1.4.112]) by avexch1.qlogic.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 30 Mar 2010 15:24:02 -0700 Received: from avexcashub2.qlogic.org (10.1.4.116) by avexcashub1.qlogic.org (10.1.4.161) with Microsoft SMTP Server (TLS) id 8.1.375.2; Tue, 30 Mar 2010 15:24:01 -0700 Received: from [10.29.2.82] (10.29.2.82) by avexcashub2.qlogic.org (10.1.4.162) with Microsoft SMTP Server id 8.1.375.2; Tue, 30 Mar 2010 15:24:01 -0700 Subject: [PATCH] IB/rds: use IB_CQ_REPORT_MISSED_EVENTS to avoid missed CQ callbacks From: Ralph Campbell To: Andy Grover CC: linux-rdma Organization: QLogic Date: Tue, 30 Mar 2010 15:24:01 -0700 Message-ID: <1269987841.4192.228.camel@chromite.mv.qlogic.com> MIME-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) X-OriginalArrivalTime: 30 Mar 2010 22:24:02.0635 (UTC) FILETIME=[B38991B0:01CAD057] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 30 Mar 2010 22:24:08 +0000 (UTC) diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index a10fab6..609ae66 100644 --- a/net/rds/ib_send.c +++ b/net/rds/ib_send.c @@ -187,10 +187,8 @@ void rds_ib_send_cq_comp_handler(struct ib_cq *cq, void *context) rdsdebug("cq %p conn %p\n", cq, conn); rds_ib_stats_inc(s_ib_tx_cq_call); - ret = ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); - if (ret) - rdsdebug("ib_req_notify_cq send failed: %d\n", ret); +again: while (ib_poll_cq(cq, 1, &wc) > 0) { rdsdebug("wc wr_id 0x%llx status %u byte_len %u imm_data %u\n", (unsigned long long)wc.wr_id, wc.status, wc.byte_len, @@ -264,6 +262,12 @@ void rds_ib_send_cq_comp_handler(struct ib_cq *cq, void *context) &conn->c_faddr, wc.status); } } + ret = ib_req_notify_cq(cq, IB_CQ_NEXT_COMP | + IB_CQ_REPORT_MISSED_EVENTS); + if (ret > 0) + goto again; + if (ret < 0) + rdsdebug("ib_req_notify_cq send failed: %d\n", ret); } /*