I'm trying to run some tests using IORING_SETUP_SQPOLL, but when it's set and I call io_uring_cqe_get_data(cqe);
I get "cqe failed: Bad file descriptor". Reading about Kernel Side Polling in io_uring.pdf, it seems that I might have to call:
/* fills in new sqe entries */
add_more_io();
/*
* need to call io_uring_enter() to make the kernel notice the new IO
* if polled and the thread is now sleeping.
*/
if ((*sqring→flags) & IORING_SQ_NEED_WAKEUP)
io_uring_enter(ring_fd, to_submit, to_wait, IORING_ENTER_SQ_WAKEUP);
but when I try to compile it, gcc cannot find io_uring_enter() (undefined reference to `io_uring_enter')
- I'm using Ubuntu 18.04.5 LTS - kernel: 5.4.0-62-generic.
- The code can be found here
Does anyone have some experience with this option/flag?