On 01/06/2016 06:21 AM, Christoph Hellwig wrote:
On Tue, Jan 05, 2016 at 03:26:49PM +0100, Bart Van Assche wrote:
The Last WQE Reached event is only generated after one or more work
requests have been queued on the QP associated with a session. Since
session shutdown can start before any work requests have been queued,
use a zero-length RDMA write to wait until a QP has been drained.

We actually ran into the same issue with a SRPT-derived work in progress
driver recently..

@@ -2314,14 +2346,13 @@ static void srpt_cm_timewait_exit(struct srpt_rdma_ch 
*ch)
  {
        pr_info("Received CM TimeWait exit for ch %s-%d.\n", ch->sess_name,
                ch->qp->qp_num);
+       srpt_close_ch(ch);
  }

  static void srpt_cm_rep_error(struct srpt_rdma_ch *ch)
  {
        pr_info("Received CM REP error for ch %s-%d.\n", ch->sess_name,
                ch->qp->qp_num);
  }

  /**
@@ -2329,33 +2360,7 @@ static void srpt_cm_rep_error(struct srpt_rdma_ch *ch)
   */
  static void srpt_cm_dreq_recv(struct srpt_rdma_ch *ch)
  {
+       srpt_disconnect_ch(ch);
  }

  /**
@@ -2364,7 +2369,7 @@ static void srpt_cm_dreq_recv(struct srpt_rdma_ch *ch)
  static void srpt_cm_drep_recv(struct srpt_rdma_ch *ch)
  {
        pr_info("Received InfiniBand DREP message for cm_id %p.\n", ch->cm_id);
+       srpt_close_ch(ch);
  }


Is there any good reason to keep these one-liner helpers around?

Hello Christoph,

Not really. I will inline these functions.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to