Skip to content

Commit

Permalink
prov/tcp: use readv2 when passing flags to io uring
Browse files Browse the repository at this point in the history
the previously used io_uring_prep_readv function does not
support flags, instead flags were being passed as an offset,
triggering an illegal seek error
  • Loading branch information
ooststep committed Jan 27, 2025
1 parent ceb84c4 commit f256c16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/iouring.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ ssize_t ofi_sockapi_recvv_uring(struct ofi_sockapi *sockapi, SOCKET sock,
if (!sqe)
return -FI_EOVERFLOW;

io_uring_prep_readv(sqe, sock, iov, cnt, flags);
/* MSG_NOSIGNAL would return ENOTSUP with io_uring */
flags &= ~MSG_NOSIGNAL;

io_uring_prep_readv2(sqe, sock, iov, cnt, 0, flags);
io_uring_sqe_set_data(sqe, ctx);
ctx->uring_sqe_inuse = true;
uring->credits--;
Expand Down

0 comments on commit f256c16

Please sign in to comment.