diff mbox

IB/rds: use IB_CQ_REPORT_MISSED_EVENTS to avoid missed CQ callbacks

Message ID 1269987841.4192.228.camel@chromite.mv.qlogic.com (mailing list archive)
State Rejected, archived
Headers show

Commit Message

Ralph Campbell March 30, 2010, 10:24 p.m. UTC
None
diff mbox

Patch

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);
 }
 
 /*