aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
3 daysMerge branch 'recvsend-bundle'upstream-masterJens Axboe
* recvsend-bundle: test/recvsend_bundle: add UDP tests as well test/recvsend_bundle: drop unused 'i' test/recvsend_bundle: use send bundle prep helper Add man page references to provided buffers Add man page for send bundle Add send bundle helper test/recvsend_bundle: add basic test case for send bundle Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 daystest/accept-non-empty: add accept IORING_CQE_F_SOCK_NONEMPTY testJens Axboe
This tests whether we correctly get IORING_CQE_F_SOCK_NONEMPTY set on an accept request, if there are more connections pending after the current one has been accepted. The test is currently gated on IORING_FEAT_RECVSEND_BUNDLE, as that got added to the kernel at the same time as this feature. Not the prettiest, but it's what we have for now... Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 daysio_uring.h: sync with 6.10 kernelJens Axboe
Add the definitions etc that got added in the 6.10 merge window. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-05-05Merge branch 'pu/test-clean' of https://github.com/guillemj/liburingJens Axboe
* 'pu/test-clean' of https://github.com/guillemj/liburing: test: Remove the coredump if coredump.t managed to generate one
2024-05-05Merge branch 'pu/libffi-symbols' of https://github.com/guillemj/liburingJens Axboe
* 'pu/libffi-symbols' of https://github.com/guillemj/liburing: liburing-ffi.map: Add comments for symbols added in wrong version node
2024-05-05test: Remove the coredump if coredump.t managed to generate oneGuillem Jover
The test case tries to segfault so that it can generate a coredump. So this is an expected artifact from the test case, that we should be cleaning up, and not something that requires investigation by the builder. Signed-off-by: Guillem Jover <guillem@hadrons.org>
2024-05-05liburing-ffi.map: Add comments for symbols added in wrong version nodeGuillem Jover
These symbols all appeared in the 2.6 version. One was added in 2.5, but the symbol name in the map file was wrong so it was not exported. The rest were all added in 2.6 but in the wrong nodes, either 2.4 or 2.5. We cannot fix these now because the version is now attached to the symbols, so the best we can do w/o breaking ABI is to document this in the map file so that other people do not get confused. Signed-off-by: Guillem Jover <guillem@hadrons.org>
2024-05-03man: fix IORING_REGISTER_RING_FDS docsJeff Moyer
The documentation for the 'arg' parameter is incorrect. Fix it. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Link: https://lore.kernel.org/r/x49bk5mehci.fsf@segfault.usersys.redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-05-01test/buf-ring: skip on older kernels that don't support mmap'ed ringsJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-05-01test: skip test case if underlying filesystem doesn't support O_DIRECTJens Axboe
This is a bad test setup as you need O_DIRECT for full coverage, but just skip tests if we fail opening a file with O_DIRECT. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-30CHANGELOG: minor updatesJens Axboe
Not an exhaustive list of changes since 2.5, but at least it's some approximation. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-26examples/proxy: correct sendmsg + bundles messageJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-26Fix portability issues in configure scriptArthur Williams
The configure script failed on my setup because of the invalid printf directive "%" and for use of the unportable "echo -e". These have been replaced with more portable options. Signed-off-by: Arthur Williams <taaparthur@disroot.org> Link: https://lore.kernel.org/r/20240426063150.27949-1-taaparthur@disroot.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-22examples/proxy: increment open_conns early for sink modeJens Axboe
It never goes through socket/connect, so do it upfront when we're set up for communication. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-20test/msg-ring: synchronize remote test case with a pthread barrierJens Axboe
Link: https://github.com/axboe/liburing/issues/1135 Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-20examples/proxy: re-arm receive if no new send is preparedJens Axboe
We should re-arm the receive if we get -ENOBUFS for a receive even if there's no send pending, as we may not actually prepare a send. Check the return value of prep_next_send() to help make that call. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-19t/socket-io-cmd: do single retry for SIOCINQJens Axboe
Sometimes we find legitimate data in the socket, which is a bit of a mystery, but it should not fail the test case as the data is indeed there and it isn't a test failure. It just arrives between the ioctl and io_uring SIOCINQ. Add a single retry in case this happens, as it should not fail the test case. Link: https://github.com/axboe/liburing/issues/1136 Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-19test/socket-io-cmd: don't use CQE after io_uring_cqe_seen()Jens Axboe
Doesn't matter here as there's only one SQE inflight and no more CQEs will get generated before this one is done, but it's bad practice. CQEs should always be fully read before they are marked as seen. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-19test/sqpoll-cancel-hang: remove testJens Axboe
This is one of those awful syzbot based tests, that make all sorts of arch assumptions. We've previously disabled it on some archs, but apparently it's segfaulting on others now. Just remove it, it's served its purpose. https://github.com/axboe/liburing/issues/1134 Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-17register: use do_register() for NAPI register/unregisterJens Axboe
This is the helper that should get used, so that it works regardless of whether or not the ring fd itself is registered. Link: https://github.com/axboe/liburing/issues/1133 Fixes: 3b25a80ecbf1 ("liburing: add api to set napi busy poll settings") Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-14Merge branch 'fix_clear_flags' of https://github.com/gxuu/liburingJens Axboe
* 'fix_clear_flags' of https://github.com/gxuu/liburing: Add initialization function of io_uring_sqe
2024-04-14Add initialization function of io_uring_sqegxu
Use io_uring_initialize_sqe to initialize SQEs at the end of io_uring_get_sqe call. Move initialization to an earlier stage is helpful as users are not forced to set relevent SQE members after they call io_uring_prep_*. Fixes: https://github.com/axboe/liburing/issues/1126 Signed-off-by: gxu <georgexu420@gmail.com>
2024-04-08examples/sendzc: test background pollingPavel Begunkov
There are some performance effects depending on whether the sock is polled or not even when it never actually triggers. That applies to non-zerocopy as well. Add a flag to test it. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/152a9e0773920d0affd675d1e75983271bcd6732.1712535205.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-08io_uring/sendzc: add DEFER_TASKRUN testingPavel Begunkov
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/a0d822f0e8ebb5e78856457c126dea25b9a517b9.1712594147.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-08test/sendzc: improve zc support probingPavel Begunkov
Move probing whether we support zerocopy send or not to the beginning instead of relying on test_basic_send(). Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/03c9abafbf8d00d8f5f44fb61ce990cac0960121.1712594147.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-08test: handle test_send_faults()'s cases one by onePavel Begunkov
There are 3 different cases tested by test_send_faults(), requests for which are sent together. That's not too convenient, complicates CQEs checking and opens some space for error. Do them one at a time. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/d9b3f41c15dbe993f7bec1d058c480375f6d852e.1712594147.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-05man/io_uring_setup.2: Improve IORING_SETUP_REGISTERED_FD_ONLY documentationGabriel Krisman Bertazi
Document that IORING_SETUP_REGISTERED_FD_ONLY depends on IORING_SETUP_NO_MMAP being set. Closes: https://github.com/axboe/liburing/issues/1087 Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20240403164413.16398-3-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-05man/io_uring_enter.2: Move poll update behavior to poll removeGabriel Krisman Bertazi
Since early days of OP_POLL_*, we had kernel commit c5de00366e3e ("io_uring: move poll update into remove not add"), which disabled poll update in the POLL_ADD path and moved it to POLL_REMOVE. This updates the man page to reflect that change. Closes: https://github.com/axboe/liburing/pull/1095 Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20240403164413.16398-2-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-02test/msg-ring-fd: fix bugs in test caseJens Axboe
Add more error checking, and ensure we mark the MSG_RING completion as seen. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-02test: update for older kernelsJens Axboe
Sometimes test cases are written and tested, but they don't properly skip testing on older stable kernels where a particular feature may not be available. Most of these are sparse file registration related. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-04-02Add test case for creation/teardown of memory mapped provided buffersJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-29test/msg-ring-fd: add test case for FD passing with MSG_RINGJens Axboe
Basic test cases that tests both local and "remote" delivery of a fixed file descriptor from one ring to another. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-29examples/proxy: be a bit smarter in handling send/sendmsg zerocopyJens Axboe
Once we have a full receive of data, then start doing sends. Each send will generate two CQEs: 1) First CQE is tells you the data has been sent. It has the usual cqe->res for how much data was sent. This CQE will have CQE_F_MORE set, as one more CQE is expected for this send. 2) The second CQE has CQE_F_NOTIF set, and is a notification that the data has been acked by the other side. This tells the application that the buffer is safe to reuse. For send/sendmsg zerocopy, wait until all notifications have been received before arming a new receive. Once we get the NOTIF notifications, we know we can safely reuse the data for receiving new data. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-28test/msg-ring: test DEFER_TASKRUN as wellJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-28test/send_recv: set IORING_SETUP_SUBMIT_ALLJens Axboe
The test_invalid() relies on both being submitted even though it encounters an error at prep time, and on newer kernels with the improved async setup, this means it'll only submit 1 of the 2 requests. Set IORING_SETUP_SUBMIT_ALL to tell the kernel to keep submitting, even in case of errors. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-28test/connect: add SQPOLL as wellJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-26Merge branch 'memory-ordering-and-atomicity' of ↵Jens Axboe
https://github.com/shachaf/liburing * 'memory-ordering-and-atomicity' of https://github.com/shachaf/liburing: Fix memory ordering/atomic access
2024-03-26test/file-register: ensure the fail case allocates enoughJens Axboe
For the fail case, we only allocate 10 descriptors, yet still try and use 100 in the array. Allocate enough and ensure that we clear them to -2 as well, as the default clear of -1 means "sparse placeholder" for the file registration code. Reported-by: Manu Bretelle <chantra@meta.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-23examples/proxy: don't include NOTIF cqes as errors for sendJens Axboe
Need to rework the send zc side a bit, but at least this is an immediate fix. The way send zc works is that we get two notifications per send: 1) The normal one that tells you how much data was sent. This one will have IORING_CQE_F_MORE set. 2) A notification CQE that has IORING_CQE_F_NOTIF set. This one tells you that the data is safe to reuse. If we serialize each send by waiting on both, then we're doomed in performance as we need to wait for the ACK. What we want to do is: 1) Keep sending as we do without zc, when we get the normal notification. This is a bit odd as CQE_F_MORE is set, but the send is really done, we're just waiting on safe-to-reuse notification. 2) The normal notification doesn't recycle buffers. 3) When the NOTIF comes in, recycle the buffers Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-22examples/proxy: include disconnected clients in byte countJens Axboe
Otherwise when a client terminates and we get a new one connected, the initial bandwidth estimate will be way off. We could also just clear it, but that's hard to get right in terms of synchronization. So let's just let it keep going up. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-22examples/proxy: don't mark connection disconnected too soonJens Axboe
Do it when both fds are closed. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-22examples/proxy: use MSG_MORE for non-sendmsg based sendsJens Axboe
We can have a backlog of data to send, we should flag each part with MSG_MORE unless we hit the end. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-22examples/proxy: be a bit smarter about recv rearmJens Axboe
Check if we're expecting more send completions, and if we do, don't rearm the receive just yet. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-22examples/proxy: wire up new opcodesJens Axboe
Forgot to add handlers to these. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-21examples/proxy: remove dead parametersJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-21examples/proxy: note if send zero copy is usedJens Axboe
Add it with the other send options listed at startup. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-21examples/proxy: add zerocopy send supportJens Axboe
This works with both -M1 (sendmsg) and -M0 (send), though at least the non-sendmsg variant seems pretty much slower than expected. Need to look into that! Very lightly tested only... Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-21examples/proxy: handle each connection in a seperate threadJens Axboe
This means the main thread is just responsible for house keeping, like accepting new connections and printing stats. It also means that each thread will get its own ring, which is closer to how you would do this in the real world. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-18test/connect: add IOSQE_ASYNC testJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-03-15test/buf-ring: test mmap'ed rings tooJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>