Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pyverbs/cmid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ cdef class CMID(PyverbsCM):
:return: New CMID representing the connection request.
"""
to_conn = CMID()
ret = cm.rdma_get_request(self.id, &to_conn.id)
with nogil:
ret = cm.rdma_get_request(self.id, &to_conn.id)
if ret != 0:
raise PyverbsRDMAErrno('Failed to get request, no connection established')
self.ctx = Context(cmid=to_conn)
Expand Down Expand Up @@ -776,7 +777,8 @@ cdef class CMID(PyverbsCM):
:return: The retrieved WC or None if there is no completions
"""
cdef v.ibv_wc wc
ret = cm.rdma_get_recv_comp(self.id, &wc)
with nogil:
ret = cm.rdma_get_recv_comp(self.id, &wc)
if ret < 0:
raise PyverbsRDMAErrno('Failed to retrieve receive completion')
elif ret == 0:
Expand All @@ -794,7 +796,8 @@ cdef class CMID(PyverbsCM):
:return: The retrieved WC or None if there is no completions
"""
cdef v.ibv_wc wc
ret = cm.rdma_get_send_comp(self.id, &wc)
with nogil:
ret = cm.rdma_get_send_comp(self.id, &wc)
if ret < 0:
raise PyverbsRDMAErrno('Failed to retrieve send completion')
elif ret == 0:
Expand Down
6 changes: 3 additions & 3 deletions pyverbs/librdmacm.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ cdef extern from '<rdma/rdma_cma.h>':
int rdma_destroy_id(rdma_cm_id *id)
int rdma_get_remote_ece(rdma_cm_id *id, ibv_ece *ece)
int rdma_set_local_ece(rdma_cm_id *id, ibv_ece *ece)
int rdma_get_request(rdma_cm_id *listen, rdma_cm_id **id)
int rdma_get_request(rdma_cm_id *listen, rdma_cm_id **id) nogil
int rdma_bind_addr(rdma_cm_id *id, sockaddr *addr)
int rdma_resolve_addr(rdma_cm_id *id, sockaddr *src_addr,
sockaddr *dst_addr, int timeout_ms)
Expand Down Expand Up @@ -149,8 +149,8 @@ cdef extern from '<rdma/rdma_verbs.h>':
int rdma_post_write(rdma_cm_id *id, void *context, void *addr,
size_t length, ibv_mr *mr, int flags,
uint64_t remote_addr, uint32_t rkey)
int rdma_get_send_comp(rdma_cm_id *id, ibv_wc *wc)
int rdma_get_recv_comp(rdma_cm_id *id, ibv_wc *wc)
int rdma_get_send_comp(rdma_cm_id *id, ibv_wc *wc) nogil
int rdma_get_recv_comp(rdma_cm_id *id, ibv_wc *wc) nogil
ibv_mr *rdma_reg_msgs(rdma_cm_id *id, void *addr, size_t length)
ibv_mr *rdma_reg_read(rdma_cm_id *id, void *addr, size_t length)
ibv_mr *rdma_reg_write(rdma_cm_id *id, void *addr, size_t length)
Expand Down