Skip to content

io_uring_prep_send returning zero in the CQE with polling #1435

@bitonic

Description

@bitonic

I'm witnessing an odd behavior whereby io_uring_prep_send SQEs get completed with res = 0, even if the connection is still alive and using send directly works just fine. This is on 6.10.3 and sending messages down a blocking TCP socket, with a polling uring.

I think this is due to MSG_DONTWAIT being passed to sock_sendmsg. MSG_DONTWAIT is set when IO_URING_F_NONBLOCK is set, which I think is the case for polling queues. So I'd imagine that when the socket buffer is full you'll just get 0.

Is this expected? I'd expect send on blocking sockets to block until space is present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions