uint8_t event_port_index;\r
};\r
\r
+__declspec(dllexport)\r
+IWVProvider *ibv_get_winverbs(void)\r
+{\r
+ HRESULT hr;\r
+\r
+ if (prov == NULL) {\r
+ hr = WvGetObject(IID_IWVProvider, (LPVOID*) &prov);\r
+ if (FAILED(hr)) {\r
+ return NULL;\r
+ }\r
+ }\r
+\r
+ prov->AddRef();\r
+ return prov;\r
+}\r
+\r
__declspec(dllexport)\r
struct ibv_device **ibv_get_device_list(int *num)\r
{\r
vchan->count--;\r
vchan->cq[cq->channel_index] = vchan->cq[vchan->count];\r
vchan->event[cq->channel_index] = vchan->event[vchan->count];\r
+ vchan->cq[cq->channel_index]->channel_index = cq->channel_index;\r
LeaveCriticalSection(&vchan->lock);\r
}\r
\r
} 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