Francesco Mazzoli

Results 38 comments of Francesco Mazzoli

@axboe sure, I'll try to reduce to a small repro. In the meantime, an alternative question might simply be: when can I expect `send` SQEs to have CQEs with ret=0...

@axboe `ret` is just the return value of `io_send`. Yes, I think it's just `sock_sendmsg` returning 0 because of `MSG_DONTWAIT` being set if SQPOLL, but then the question is whether...

OK, here's the repro: ```c #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include // Required for errno #define fail(fmt, ...) do { fprintf(stderr, fmt "\n"...

And just for completeness, here's a version which adds a non-uring server, just to verify that normal send works: ```c #define _GNU_SOURCE #include #include #include #include #include #include #include #include...

@axboe that makes sense, and I knew about the 0x7ffff000 maximum write for write/send, but I'd argue that the fact that it just does not work for `io_uring` is still...

@axboe yes if that is the API then `io_uring_prep_send` should be changed to get an u32 length. Otherwise I'd imagine most people would assume that the API matches the one...

You don't need any branch, just `uint32_t len32 = std::min(len, ~(uint32_t)0)` (forgive the C++), which will probably compile to a cmov.

(And even the branch would be super predictable, that is, almost free)