Age | Commit message (Collapse) | Author |
|
* 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>
|
|
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>
|
|
Add the definitions etc that got added in the 6.10 merge window.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
* 'pu/test-clean' of https://github.com/guillemj/liburing:
test: Remove the coredump if coredump.t managed to generate one
|
|
* 'pu/libffi-symbols' of https://github.com/guillemj/liburing:
liburing-ffi.map: Add comments for symbols added in wrong version node
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
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>
|
|
Not an exhaustive list of changes since 2.5, but at least it's some
approximation.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
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>
|
|
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>
|
|
Link: https://github.com/axboe/liburing/issues/1135
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
* 'fix_clear_flags' of https://github.com/gxuu/liburing:
Add initialization function of io_uring_sqe
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Add more error checking, and ensure we mark the MSG_RING completion
as seen.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
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>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
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>
|
|
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>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
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>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
https://github.com/shachaf/liburing
* 'memory-ordering-and-atomicity' of https://github.com/shachaf/liburing:
Fix memory ordering/atomic access
|
|
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>
|
|
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>
|
|
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>
|
|
Do it when both fds are closed.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
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>
|
|
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>
|
|
Forgot to add handlers to these.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Add it with the other send options listed at startup.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
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>
|
|
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>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|