Thread (13 messages) 13 messages, 4 authors, 2018-01-24
DORMANTno replies

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

From: Max Gurtovoy <hidden>
Date: 2018-01-24 10:20:33
Also in: linux-nvme


On 1/24/2018 8:39 AM, Sagi Grimberg wrote:
Hi Max,
Hi Sagi,
quoted
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?
I don't think I can. The event can arrive *before* the call to ib_drain_srq.
The simplest way I can think of is to have the core register its own
event handler for that..
Do you mean not raising this event to ULP at all ? I can check this (I 
don't think we do it for other events we get...).
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help