ibv_qp_create does not set QP values until after ibv_qp_query has been called to obtain the QPN. However, ibv_qp_query assumes that the values have been set.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1827
ad392aa1-c5ef-ae45-8dd8-
e69d62a5ef86
} else {\r
qp->conn_handle->QueryInterface(IID_IWVQueuePair, (LPVOID *) &qp->handle);\r
}\r
- hr = ibv_query_qp(qp, &attr, (enum ibv_qp_attr_mask) 0xFFFFFFFF, qp_init_attr);\r
- if (FAILED(hr)) {\r
- goto err;\r
- }\r
\r
qp->context = pd->context;\r
qp->qp_context = qp_init_attr->qp_context;\r
qp->state = IBV_QPS_RESET;\r
/* qp_num set by ibv_query_qp */\r
qp->qp_type = qp_init_attr->qp_type;\r
+\r
+ hr = ibv_query_qp(qp, &attr, (enum ibv_qp_attr_mask) 0xFFFFFFFF, qp_init_attr);\r
+ if (FAILED(hr)) {\r
+ goto err;\r
+ }\r
+\r
return qp;\r
\r
err:\r