From 796e9fa16c4358e335e778ec790fce9012a46e08 Mon Sep 17 00:00:00 2001 From: Jack Morgenstein Date: Sun, 3 Jun 2007 13:33:01 -0700 Subject: [PATCH] Initialize QP state to RESET For newly created QPs, set qp->state to IBV_QPS_RESET. At least libmlx4 needs this fix, or else it won't correctly initialize the QP's send queue when transitioning to INIT. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier --- src/verbs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/verbs.c b/src/verbs.c index febf32a..f5cf4d3 100644 --- a/src/verbs.c +++ b/src/verbs.c @@ -406,6 +406,7 @@ struct ibv_qp *__ibv_create_qp(struct ibv_pd *pd, qp->recv_cq = qp_init_attr->recv_cq; qp->srq = qp_init_attr->srq; qp->qp_type = qp_init_attr->qp_type; + qp->state = IBV_QPS_RESET; qp->events_completed = 0; pthread_mutex_init(&qp->mutex, NULL); pthread_cond_init(&qp->cond, NULL); -- 2.41.0