loti-examples
loti-examples copied to clipboard
Source code for example programs from Lord of the io_uring guide
Building on the 6.0 kernel failed on the version check because MIN_MAJOR_VERSION was less than 5.
IORING_OP_LAST will be taken from current kernel headers. This leads all new opcodes to be skipped.
On kernels without io_uring, io_uring_probe returns NULL, leading to a segfault in probe. Check the result instead, and print the appropriate error message. Signed-off-by: Stephen Kitt
The issue was discovered when running the "webserver_liburing" example. The values of cqe was printed out after the following code was called the first time: ``` int ret = io_uring_wait_cqe(&ring,...
 Any problem if we give a long-term data address to `sqe` just like above? It is the same as `send_headers()`.

Though we have allocate a large enough buffer(READ_SZ) for reading from client, it is possible that we don't receive a complete http request. Though `handle_client_request() ` checks for "\r\n" and...
Hi, "offset" defined at line 91 is incremented in a loop later on but never actually used. So, it looks like this variable should be removed.
If probe is built with a newer liburing, IORING_OP_LAST can be greater than the number of operations described in op_strs. Handle this gracefully by counting the number of supported-but-unknown operations....
Hi, I'm new to io_uring and encountered the following error when running the sq_poll example: ``` $ sudo ./sq_poll Kernel thread io_uring-sq is not running. Error in async operation: Invalid...