* [PATCH io_uring-7.0] io_uring/query: return support for custom rx page size
@ 2026-02-15 21:34 Pavel Begunkov
2026-02-15 21:49 ` Jens Axboe
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Pavel Begunkov @ 2026-02-15 21:34 UTC (permalink / raw)
To: io-uring; +Cc: asml.silence, axboe, netdev
Add an ability to query if the zcrx rx page size setting is available.
Note, even when the API is supported by io_uring, the registration can
still get rejected for various reasons, e.g. when the NIC or the driver
doesn't support it, when the particular specified size is unsupported,
when the memory area doesn't satisfy all requirements, etc.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
It's a simple change, would be great to have in 7.0 so it comes in the
same release with the feature.
include/uapi/linux/io_uring.h | 8 ++++++++
include/uapi/linux/io_uring/query.h | 3 ++-
io_uring/query.c | 2 +-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index fc473af6feb4..6750c383a2ab 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -1090,6 +1090,14 @@ enum zcrx_reg_flags {
ZCRX_REG_IMPORT = 1,
};
+enum zcrx_features {
+ /*
+ * The user can ask for the desired rx page size by passing the
+ * value in struct io_uring_zcrx_ifq_reg::rx_buf_len.
+ */
+ ZCRX_FEATURE_RX_PAGE_SIZE = 1 << 0,
+};
+
/*
* Argument for IORING_REGISTER_ZCRX_IFQ
*/
diff --git a/include/uapi/linux/io_uring/query.h b/include/uapi/linux/io_uring/query.h
index 2456e6c5ebb5..0b6248175e26 100644
--- a/include/uapi/linux/io_uring/query.h
+++ b/include/uapi/linux/io_uring/query.h
@@ -50,7 +50,8 @@ struct io_uring_query_zcrx {
__u64 area_flags;
/* The number of supported ZCRX_CTRL_* opcodes */
__u32 nr_ctrl_opcodes;
- __u32 __resv1;
+ /* Bitmask of ZCRX_FEATURE_* indicating which features are available */
+ __u32 features;
/* The refill ring header size */
__u32 rq_hdr_size;
/* The alignment for the header */
diff --git a/io_uring/query.c b/io_uring/query.c
index abdd6f3e1223..63cc30c9803d 100644
--- a/io_uring/query.c
+++ b/io_uring/query.c
@@ -39,7 +39,7 @@ static ssize_t io_query_zcrx(union io_query_data *data)
e->nr_ctrl_opcodes = __ZCRX_CTRL_LAST;
e->rq_hdr_size = sizeof(struct io_uring);
e->rq_hdr_alignment = L1_CACHE_BYTES;
- e->__resv1 = 0;
+ e->features = ZCRX_FEATURE_RX_PAGE_SIZE;
e->__resv2 = 0;
return sizeof(*e);
}
--
2.52.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH io_uring-7.0] io_uring/query: return support for custom rx page size
2026-02-15 21:34 [PATCH io_uring-7.0] io_uring/query: return support for custom rx page size Pavel Begunkov
@ 2026-02-15 21:49 ` Jens Axboe
2026-02-15 22:06 ` Jens Axboe
2026-02-15 22:13 ` Jens Axboe
2 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2026-02-15 21:49 UTC (permalink / raw)
To: Pavel Begunkov, io-uring; +Cc: netdev
On 2/15/26 2:34 PM, Pavel Begunkov wrote:
> Add an ability to query if the zcrx rx page size setting is available.
>
> Note, even when the API is supported by io_uring, the registration can
> still get rejected for various reasons, e.g. when the NIC or the driver
> doesn't support it, when the particular specified size is unsupported,
> when the memory area doesn't satisfy all requirements, etc.
>
> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
> ---
>
> It's a simple change, would be great to have in 7.0 so it comes in the
> same release with the feature.
Looks fine, only replying to say that I think all of the ones posted
today should just hit 7.0, no reason to defer any of them.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH io_uring-7.0] io_uring/query: return support for custom rx page size
2026-02-15 21:34 [PATCH io_uring-7.0] io_uring/query: return support for custom rx page size Pavel Begunkov
2026-02-15 21:49 ` Jens Axboe
@ 2026-02-15 22:06 ` Jens Axboe
2026-02-15 22:11 ` Pavel Begunkov
2026-02-15 22:13 ` Jens Axboe
2 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2026-02-15 22:06 UTC (permalink / raw)
To: Pavel Begunkov, io-uring; +Cc: netdev
On 2/15/26 2:34 PM, Pavel Begunkov wrote:
> diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
> index fc473af6feb4..6750c383a2ab 100644
> --- a/include/uapi/linux/io_uring.h
> +++ b/include/uapi/linux/io_uring.h
> @@ -1090,6 +1090,14 @@ enum zcrx_reg_flags {
> ZCRX_REG_IMPORT = 1,
> };
>
> +enum zcrx_features {
> + /*
> + * The user can ask for the desired rx page size by passing the
> + * value in struct io_uring_zcrx_ifq_reg::rx_buf_len.
> + */
> + ZCRX_FEATURE_RX_PAGE_SIZE = 1 << 0,
> +};
Well I guess one comment - supposedly ->rx_buf_len is going to be added
in the future? Because right now it's not there.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH io_uring-7.0] io_uring/query: return support for custom rx page size
2026-02-15 22:06 ` Jens Axboe
@ 2026-02-15 22:11 ` Pavel Begunkov
2026-02-15 22:12 ` Jens Axboe
0 siblings, 1 reply; 6+ messages in thread
From: Pavel Begunkov @ 2026-02-15 22:11 UTC (permalink / raw)
To: Jens Axboe, io-uring; +Cc: netdev
On 2/15/26 22:06, Jens Axboe wrote:
> On 2/15/26 2:34 PM, Pavel Begunkov wrote:
>> diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
>> index fc473af6feb4..6750c383a2ab 100644
>> --- a/include/uapi/linux/io_uring.h
>> +++ b/include/uapi/linux/io_uring.h
>> @@ -1090,6 +1090,14 @@ enum zcrx_reg_flags {
>> ZCRX_REG_IMPORT = 1,
>> };
>>
>> +enum zcrx_features {
>> + /*
>> + * The user can ask for the desired rx page size by passing the
>> + * value in struct io_uring_zcrx_ifq_reg::rx_buf_len.
>> + */
>> + ZCRX_FEATURE_RX_PAGE_SIZE = 1 << 0,
>> +};
>
> Well I guess one comment - supposedly ->rx_buf_len is going to be added
> in the future? Because right now it's not there.
# git blame include/uapi/linux/io_uring.h | grep rx_buf_len
795663b4d160b (Pavel Begunkov 2026-01-24 10:36:17 +0000 1115) __u32 rx_buf_len;
commit 795663b4d160ba652959f1a46381c5e8b1342a53 (tag: for-7.0/io_uring-zcrx-large-buffers-20260206, axboe2/for-7.0/io_uring-zcrx-large-buffers)
Author: Pavel Begunkov <asml.silence@gmail.com>
Date: Sat Jan 24 10:36:17 2026 +0000
io_uring/zcrx: implement large rx buffer support
You should've already forwarded it to Linus with
"[GIT PULL] Large buffer support for zcrx".
Different base?
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH io_uring-7.0] io_uring/query: return support for custom rx page size
2026-02-15 22:11 ` Pavel Begunkov
@ 2026-02-15 22:12 ` Jens Axboe
0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2026-02-15 22:12 UTC (permalink / raw)
To: Pavel Begunkov, io-uring; +Cc: netdev
On 2/15/26 3:11 PM, Pavel Begunkov wrote:
> On 2/15/26 22:06, Jens Axboe wrote:
>> On 2/15/26 2:34 PM, Pavel Begunkov wrote:
>>> diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
>>> index fc473af6feb4..6750c383a2ab 100644
>>> --- a/include/uapi/linux/io_uring.h
>>> +++ b/include/uapi/linux/io_uring.h
>>> @@ -1090,6 +1090,14 @@ enum zcrx_reg_flags {
>>> ZCRX_REG_IMPORT = 1,
>>> };
>>> +enum zcrx_features {
>>> + /*
>>> + * The user can ask for the desired rx page size by passing the
>>> + * value in struct io_uring_zcrx_ifq_reg::rx_buf_len.
>>> + */
>>> + ZCRX_FEATURE_RX_PAGE_SIZE = 1 << 0,
>>> +};
>>
>> Well I guess one comment - supposedly ->rx_buf_len is going to be added
>> in the future? Because right now it's not there.
>
> # git blame include/uapi/linux/io_uring.h | grep rx_buf_len
> 795663b4d160b (Pavel Begunkov 2026-01-24 10:36:17 +0000 1115) __u32 rx_buf_len;
>
> commit 795663b4d160ba652959f1a46381c5e8b1342a53 (tag: for-7.0/io_uring-zcrx-large-buffers-20260206, axboe2/for-7.0/io_uring-zcrx-large-buffers)
> Author: Pavel Begunkov <asml.silence@gmail.com>
> Date: Sat Jan 24 10:36:17 2026 +0000
>
> io_uring/zcrx: implement large rx buffer support
>
>
> You should've already forwarded it to Linus with
> "[GIT PULL] Large buffer support for zcrx".
Ah this is why, io_uring-7.0 is behind master as the large buffer
support got merged post the netdev PR. OK all good then, it'll be fine
once merged!
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH io_uring-7.0] io_uring/query: return support for custom rx page size
2026-02-15 21:34 [PATCH io_uring-7.0] io_uring/query: return support for custom rx page size Pavel Begunkov
2026-02-15 21:49 ` Jens Axboe
2026-02-15 22:06 ` Jens Axboe
@ 2026-02-15 22:13 ` Jens Axboe
2 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2026-02-15 22:13 UTC (permalink / raw)
To: io-uring, Pavel Begunkov; +Cc: netdev
On Sun, 15 Feb 2026 21:34:28 +0000, Pavel Begunkov wrote:
> Add an ability to query if the zcrx rx page size setting is available.
>
> Note, even when the API is supported by io_uring, the registration can
> still get rejected for various reasons, e.g. when the NIC or the driver
> doesn't support it, when the particular specified size is unsupported,
> when the memory area doesn't satisfy all requirements, etc.
>
> [...]
Applied, thanks!
[1/1] io_uring/query: return support for custom rx page size
commit: c29214677a9fc1a3a4ee65e189afeb5fd10d676f
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-02-15 22:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-15 21:34 [PATCH io_uring-7.0] io_uring/query: return support for custom rx page size Pavel Begunkov
2026-02-15 21:49 ` Jens Axboe
2026-02-15 22:06 ` Jens Axboe
2026-02-15 22:11 ` Pavel Begunkov
2026-02-15 22:12 ` Jens Axboe
2026-02-15 22:13 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox