Skip to content

Commit

Permalink
pyverbs: Allow RecvWR init get zero num_sge
Browse files Browse the repository at this point in the history
The if was discarded because there are applications where a value of 0
is valid.

Signed-off-by: Shlomo Assaf <[email protected]>
Signed-off-by: Edward Srouji <[email protected]>
  • Loading branch information
s-assaf authored and EdwardSro committed Feb 12, 2025
1 parent c9cc01a commit 56fc7d7
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pyverbs/wr.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ cdef class RecvWR(PyverbsCM):
"""
super().__init__()
cdef v.ibv_sge *dst
if num_sge < 1 or sg is None:
raise PyverbsUserError('A WR needs at least one SGE')
self.recv_wr.sg_list = <v.ibv_sge*>malloc(num_sge * sizeof(v.ibv_sge))
if self.recv_wr.sg_list == NULL:
raise PyverbsRDMAErrno('Failed to malloc SG buffer')
Expand Down

0 comments on commit 56fc7d7

Please sign in to comment.