From: lizetao <lizetao1@huawei.com>
To: Anuj Gupta <anuj20.g@samsung.com>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"asml.silence@gmail.com" <asml.silence@gmail.com>,
"anuj1072538@gmail.com" <anuj1072538@gmail.com>
Cc: "io-uring@vger.kernel.org" <io-uring@vger.kernel.org>,
"vishak.g@samsung.com" <vishak.g@samsung.com>
Subject: RE: [PATCH] io_uring: expose read/write attribute capability
Date: Thu, 5 Dec 2024 06:54:55 +0000 [thread overview]
Message-ID: <17dd78d37d984d82baa26c70263b40bc@huawei.com> (raw)
In-Reply-To: <20241205062109.1788-1-anuj20.g@samsung.com>
> -----Original Message-----
> From: Anuj Gupta <anuj20.g@samsung.com>
> Sent: Thursday, December 5, 2024 2:21 PM
> To: axboe@kernel.dk; asml.silence@gmail.com; anuj1072538@gmail.com
> Cc: io-uring@vger.kernel.org; vishak.g@samsung.com; Anuj Gupta
> <anuj20.g@samsung.com>
> Subject: [PATCH] io_uring: expose read/write attribute capability
>
> After commit 9a213d3b80c0, we can pass additional attributes along with
> read/write. However, userspace doesn't know that. Add a new feature flag
> IORING_FEAT_RW_ATTR, to notify the userspace that the kernel has this
> ability.
>
> Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
> ---
> include/uapi/linux/io_uring.h | 1 +
> io_uring/io_uring.c | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
> index 38f0d6b10eaf..e11c82638527 100644
> --- a/include/uapi/linux/io_uring.h
> +++ b/include/uapi/linux/io_uring.h
> @@ -577,6 +577,7 @@ struct io_uring_params {
> #define IORING_FEAT_REG_REG_RING (1U << 13)
> #define IORING_FEAT_RECVSEND_BUNDLE (1U << 14)
> #define IORING_FEAT_MIN_TIMEOUT (1U << 15)
> +#define IORING_FEAT_RW_ATTR (1U << 16)
>
> /*
> * io_uring_register(2) opcodes and arguments diff --git
> a/io_uring/io_uring.c b/io_uring/io_uring.c index
> a8cbe674e5d6..a895de54eb3e 100644
> --- a/io_uring/io_uring.c
> +++ b/io_uring/io_uring.c
> @@ -3710,7 +3710,8 @@ static __cold int io_uring_create(unsigned entries,
> struct io_uring_params *p,
> IORING_FEAT_EXT_ARG |
> IORING_FEAT_NATIVE_WORKERS |
> IORING_FEAT_RSRC_TAGS | IORING_FEAT_CQE_SKIP
> |
> IORING_FEAT_LINKED_FILE |
> IORING_FEAT_REG_REG_RING |
> - IORING_FEAT_RECVSEND_BUNDLE |
> IORING_FEAT_MIN_TIMEOUT;
> + IORING_FEAT_RECVSEND_BUNDLE |
> IORING_FEAT_MIN_TIMEOUT |
> + IORING_FEAT_RW_ATTR;
>
> if (copy_to_user(params, p, sizeof(*p))) {
> ret = -EFAULT;
> --
> 2.25.1
>
Reviewed-by: Li Zetao <lizetao1@huawei.com>
--
Li Zetao
next prev parent reply other threads:[~2024-12-05 6:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20241205062910epcas5p2aed41bc2f50a58cb1966543dfd31c316@epcas5p2.samsung.com>
2024-12-05 6:21 ` [PATCH] io_uring: expose read/write attribute capability Anuj Gupta
2024-12-05 6:54 ` lizetao [this message]
2025-01-02 21:22 ` Martin K. Petersen
2025-01-10 22:21 ` Martin K. Petersen
2025-01-10 22:32 ` Pavel Begunkov
2025-01-11 0:12 ` 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 \
--in-reply-to=17dd78d37d984d82baa26c70263b40bc@huawei.com \
--to=lizetao1@huawei.com \
--cc=anuj1072538@gmail.com \
--cc=anuj20.g@samsung.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=vishak.g@samsung.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.