axboe / liburing

Library providing helpers for the Linux kernel io_uring support
MIT License
2.86k stars 402 forks source link

io_uring_prep_socket_direct -> bind -> listen -> io_uring_prep_accept_direct #941

Closed ghost closed 1 month ago

ghost commented 1 year ago

https://github.com/axboe/liburing/issues/234#issuecomment-1241888695 why are bind and listen not async yet, can they access direct descriptor?

ghost commented 1 year ago

does this mean that tcp servers using io_uring now need to handle both direct and global file descriptors?

isilence commented 1 year ago

why are bind and listen not async yet

Because they don't need to be async as they don't wait on any IO / etc. If the question why they're not supported by io_uring, then there wasn't much need before / because nobody implemented it.

can they access direct descriptor?

Direct descriptiors is an io_uring feature, so no

does this mean that tcp servers using io_uring now need to handle both direct and global file descriptors?

as a work around you can register a socket file after doing bind/listen, e.g. see io_uring_register_files()