From: Ammar Faizi <[email protected]>
To: Jens Axboe <[email protected]>
Cc: Ammar Faizi <[email protected]>,
Caleb Sander <[email protected]>,
Muhammad Rizki <[email protected]>,
Kanna Scarlet <[email protected]>,
io-uring Mailing List <[email protected]>,
Linux Kernel Mailing List <[email protected]>,
GNU/Weeb Mailing List <[email protected]>
Subject: [PATCH liburing v2 0/7] Export io_uring syscall functions
Date: Tue, 30 Aug 2022 07:56:36 +0700 [thread overview]
Message-ID: <[email protected]> (raw)
From: Ammar Faizi <[email protected]>
Hi Jens,
This series adds io_uring syscall functions and exports them. There
are 7 patches in this series:
1) Make the arguments of io_uring syscalls consistent with what is
said in the manpage. These change are in header files. No
functional change is intended.
2) Add io_uring syscall functions.
We have:
man 2 io_uring_setup;
man 2 io_uring_enter;
man 2 io_uring_register;
Those entries say that io_uring syscall functions are declared in
`<linux/io_uring.h>`. But they don't actually exist and never
existed. This is causing confusion for people who read the manpage.
Let's just implement them in liburing so they exist. This also
allows the user to invoke io_uring syscalls directly instead of
using the full liburing provided setup.
3) man: Clarify "man 2" entry for io_uring syscalls.
io_uring_enter(), io_uring_register(), and io_uring_setup() are not
declared in `<linux/io_uring.h>` (and never were). A previous
commit adds the implementation of these functions in liburing.
Change the include header to `<liburing.h>`. Then clarify that
those functions don't intentionally set the `errno` variable.
Instead they return a negative error code when the syscall fails.
4) Add `io_uring_enter2()` function signature.
Since kernel 5.11, liburing has io_uring_enter2() wrapper which
behaves just like the io_uring_enter(), but with an extra argument
for `IORING_ENTER_EXT_ARG` case. Add this function signature to the
synopsis part.
5) man: Alias `io_uring_enter2()` to `io_uring_enter()`.
We have a new function io_uring_enter2(), add the man page entry
for it by aliasing it to io_uring_enter(). The aliased man entry
has already explained it.
6) test/io_uring_{enter,setup,register}: Use the exported syscall
functions.
These tests use the internal definition of __sys_io_uring*
functions. A previous commit exported new functions that do the
same thing with those __sys_io_uring* functions. Test the exported
functions instead of the internal functions. No functional change
is intended.
7) Just a trivial typo fix.
## Changelog revision
RFC v1 -> v2:
- Make io_uring syscall arguments consistent with the manpage.
- Separate syscall declarations in liburing.h with a blank line.
- Remove unused include in syscall.c.
- Add io_uring_enter2() function signature to manpage.
- Append Reviewed-by tags from Caleb Sander.
- Fix typo introduced by an old commit, 1dbc9974486cbc.
Signed-off-by: Ammar Faizi <[email protected]>
---
Ammar Faizi (7):
syscall: Make io_uring syscall arguments consistent
syscall: Add io_uring syscall functions
man: Clarify "man 2" entry for io_uring syscalls
man: Add `io_uring_enter2()` function signature
man: Alias `io_uring_enter2()` to `io_uring_enter()`
test/io_uring_{enter,setup,register}: Use the exported syscall functions
man/io_uring_enter.2: Fix typo "which is behaves" -> "which behaves"
man/io_uring_enter.2 | 21 ++++++++++++---------
man/io_uring_enter2.2 | 1 +
man/io_uring_register.2 | 9 ++++-----
man/io_uring_setup.2 | 8 +++-----
src/Makefile | 2 +-
src/arch/generic/syscall.h | 19 ++++++++++---------
src/arch/syscall-defs.h | 19 ++++++++++---------
src/include/liburing.h | 12 ++++++++++++
src/liburing.map | 4 ++++
src/syscall.c | 29 +++++++++++++++++++++++++++++
test/io_uring_enter.c | 10 +++++-----
test/io_uring_register.c | 34 ++++++++++++++++------------------
test/io_uring_setup.c | 4 ++--
13 files changed, 109 insertions(+), 63 deletions(-)
create mode 120000 man/io_uring_enter2.2
create mode 100644 src/syscall.c
base-commit: 243477691678af27dafe378f1e19be5df61e9daf
--
Ammar Faizi
next reply other threads:[~2022-08-30 0:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 0:56 Ammar Faizi [this message]
2022-08-30 0:56 ` [PATCH liburing v2 1/7] syscall: Make io_uring syscall arguments consistent Ammar Faizi
2022-08-30 0:56 ` [PATCH liburing v2 2/7] syscall: Add io_uring syscall functions Ammar Faizi
2022-08-30 0:56 ` [PATCH liburing v2 3/7] man: Clarify "man 2" entry for io_uring syscalls Ammar Faizi
2022-08-30 0:56 ` [PATCH liburing v2 4/7] man: Add `io_uring_enter2()` function signature Ammar Faizi
2022-08-30 0:56 ` [PATCH liburing v2 5/7] man: Alias `io_uring_enter2()` to `io_uring_enter()` Ammar Faizi
2022-08-30 0:56 ` [PATCH liburing v2 6/7] test/io_uring_{enter,setup,register}: Use the exported syscall functions Ammar Faizi
2022-08-30 0:56 ` [PATCH liburing v2 7/7] man/io_uring_enter.2: Fix typo "which is behaves" -> "which behaves" Ammar Faizi
2022-08-30 14:14 ` [PATCH liburing v2 0/7] Export io_uring syscall functions Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox