Re: [PATCH 1/4] IB/core: add support for draining Shared receive queues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Max,

diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 7868727..7604450 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -886,8 +886,10 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
  		if (qp_init_attr->recv_cq)
  			atomic_inc(&qp_init_attr->recv_cq->usecnt);
  		qp->srq = qp_init_attr->srq;
-		if (qp->srq)
+		if (qp->srq) {
  			atomic_inc(&qp_init_attr->srq->usecnt);
+			init_completion(&qp->srq_completion);
+		}
  	}

How about initializing the completion at ib_drain_srq and complete it
always in last wqe reached event in the core instead of relying on ULPs
to call ib_notify_qp?

The simplest way I can think of is to have the core register its own
event handler for that..
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux