diff options
author | Stefan Roesch <shr@devkernel.io> | 2023-06-08 09:38:38 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-02-09 11:54:32 -0700 |
commit | ef1186c1a875bfa8a8cbfc2a9670b14b082187a9 (patch) | |
tree | 50da04b34a9d10306242d075b462c0ccc683d79f /include/uapi | |
parent | ff183d427da0a733b0dbe11bd7acaf2dcb37b4cc (diff) | |
download | linux-ef1186c1a875bfa8a8cbfc2a9670b14b082187a9.tar.gz |
io_uring: add register/unregister napi function
This adds an api to register and unregister the napi for io-uring. If
the arg value is specified when unregistering, the current napi setting
for the busy poll timeout is copied into the user structure. If this is
not required, NULL can be passed as the arg value.
Signed-off-by: Stefan Roesch <shr@devkernel.io>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20230608163839.2891748-7-shr@devkernel.io
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/io_uring.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index fb812f1b6bb5a..7bd10201a02bc 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -571,6 +571,10 @@ enum { /* return status information for a buffer group */ IORING_REGISTER_PBUF_STATUS = 26, + /* set/clear busy poll settings */ + IORING_REGISTER_NAPI = 27, + IORING_UNREGISTER_NAPI = 28, + /* this goes last */ IORING_REGISTER_LAST, @@ -704,6 +708,14 @@ struct io_uring_buf_status { __u32 resv[8]; }; +/* argument for IORING_(UN)REGISTER_NAPI */ +struct io_uring_napi { + __u32 busy_poll_to; + __u8 prefer_busy_poll; + __u8 pad[3]; + __u64 resv; +}; + /* * io_uring_restriction->opcode values */ |