diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2007-06-03 13:33:01 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-06-03 13:34:32 -0700 |
commit | 3674faa9274b065670779541bf27f0b281ba7497 (patch) | |
tree | 1335c284127123dd3a95248ca1128afaebc2a448 | |
parent | f6f80705251ab1a0156768a426eeaa064064913a (diff) | |
download | libibverbs-3674faa9274b065670779541bf27f0b281ba7497.tar.gz |
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 <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
(cherry picked from commit 796e9fa16c4358e335e778ec790fce9012a46e08)
-rw-r--r-- | src/verbs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/verbs.c b/src/verbs.c index 706b2b0..7092536 100644 --- a/src/verbs.c +++ b/src/verbs.c @@ -334,6 +334,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); |