Linux io-uring development
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] netdev: expose page pool order via netlink
@ 2026-06-12 21:17 Dragos Tatulea
  2026-06-12 21:17 ` [PATCH net-next v2 1/2] netdev: expose io_uring rx_page_order " Dragos Tatulea
  0 siblings, 1 reply; 5+ messages in thread
From: Dragos Tatulea @ 2026-06-12 21:17 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Donald Hunter, Andrew Lunn, Pavel Begunkov,
	Jens Axboe, Shuah Khan
  Cc: Dragos Tatulea, netdev, linux-kernel, io-uring, linux-kselftest

This small series exposes io_uring's high order page configuration
via the page_pool netlink interface and updates the appropriate
selftest to check this value.

---
v2:
- Switched from exposing page_pool order to rx_buf_len via nl_fill of
  the io_uring memory provider.
- Updated selftest to check rx_buf_len.
- v1: https://lore.kernel.org/all/20260611161235.3807332-1-dtatulea@nvidia.com/
---
Dragos Tatulea (2):
  netdev: expose io_uring rx_page_order order via netlink
  io_uring/zcrx: selftests: verify rx_buf_len for large chunks

 Documentation/netlink/specs/netdev.yaml       |  9 ++++++-
 include/uapi/linux/netdev.h                   |  2 ++
 io_uring/zcrx.c                               |  8 ++++++
 tools/include/uapi/linux/netdev.h             |  2 ++
 .../selftests/drivers/net/hw/iou-zcrx.py      | 26 ++++++++++++++++++-
 5 files changed, 45 insertions(+), 2 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net-next v2 1/2] netdev: expose io_uring rx_page_order order via netlink
  2026-06-12 21:17 [PATCH net-next v2 0/2] netdev: expose page pool order via netlink Dragos Tatulea
@ 2026-06-12 21:17 ` Dragos Tatulea
  2026-06-13  9:53   ` Pavel Begunkov
  0 siblings, 1 reply; 5+ messages in thread
From: Dragos Tatulea @ 2026-06-12 21:17 UTC (permalink / raw)
  To: Donald Hunter, Jakub Kicinski, David S. Miller, Eric Dumazet,
	Paolo Abeni, Simon Horman, Andrew Lunn, Pavel Begunkov,
	Jens Axboe
  Cc: Dragos Tatulea, Yael Chemla, Tariq Toukan, netdev, linux-kernel,
	io-uring

This adds observability for the io_uring zcrx rx-buf-len configuration.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Yael Chemla <ychemla@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
---
 Documentation/netlink/specs/netdev.yaml | 9 ++++++++-
 include/uapi/linux/netdev.h             | 2 ++
 io_uring/zcrx.c                         | 8 ++++++++
 tools/include/uapi/linux/netdev.h       | 2 ++
 4 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml
index 49862b666d7d..5f143da7458c 100644
--- a/Documentation/netlink/specs/netdev.yaml
+++ b/Documentation/netlink/specs/netdev.yaml
@@ -127,7 +127,14 @@ attribute-sets:
         enum: xsk-flags
   -
     name: io-uring-provider-info
-    attributes: []
+    attributes:
+      -
+        name: rx-buf-len
+        type: uint
+        doc: |
+          RX buffer length in bytes for this io_uring memory provider.
+          Reflects the rx_buf_len passed at io_uring zerocopy rx
+          registration time.
   -
     name: page-pool
     attributes:
diff --git a/include/uapi/linux/netdev.h b/include/uapi/linux/netdev.h
index 7df1056a35fd..2f3ab75e8cc0 100644
--- a/include/uapi/linux/netdev.h
+++ b/include/uapi/linux/netdev.h
@@ -97,6 +97,8 @@ enum {
 };
 
 enum {
+	NETDEV_A_IO_URING_PROVIDER_INFO_RX_BUF_LEN = 1,
+
 	__NETDEV_A_IO_URING_PROVIDER_INFO_MAX,
 	NETDEV_A_IO_URING_PROVIDER_INFO_MAX = (__NETDEV_A_IO_URING_PROVIDER_INFO_MAX - 1)
 };
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 19837e0b5e91..c7b167c2d4e4 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -1156,6 +1156,7 @@ static void io_pp_zc_destroy(struct page_pool *pp)
 static int io_pp_nl_fill(void *mp_priv, struct sk_buff *rsp,
 			 struct netdev_rx_queue *rxq)
 {
+	struct io_zcrx_ifq *ifq = mp_priv;
 	struct nlattr *nest;
 	int type;
 
@@ -1163,6 +1164,13 @@ static int io_pp_nl_fill(void *mp_priv, struct sk_buff *rsp,
 	nest = nla_nest_start(rsp, type);
 	if (!nest)
 		return -EMSGSIZE;
+
+	if (nla_put_uint(rsp, NETDEV_A_IO_URING_PROVIDER_INFO_RX_BUF_LEN,
+			 1ULL << ifq->niov_shift)) {
+		nla_nest_cancel(rsp, nest);
+		return -EMSGSIZE;
+	}
+
 	nla_nest_end(rsp, nest);
 
 	return 0;
diff --git a/tools/include/uapi/linux/netdev.h b/tools/include/uapi/linux/netdev.h
index 7df1056a35fd..2f3ab75e8cc0 100644
--- a/tools/include/uapi/linux/netdev.h
+++ b/tools/include/uapi/linux/netdev.h
@@ -97,6 +97,8 @@ enum {
 };
 
 enum {
+	NETDEV_A_IO_URING_PROVIDER_INFO_RX_BUF_LEN = 1,
+
 	__NETDEV_A_IO_URING_PROVIDER_INFO_MAX,
 	NETDEV_A_IO_URING_PROVIDER_INFO_MAX = (__NETDEV_A_IO_URING_PROVIDER_INFO_MAX - 1)
 };
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2 1/2] netdev: expose io_uring rx_page_order order via netlink
  2026-06-12 21:17 ` [PATCH net-next v2 1/2] netdev: expose io_uring rx_page_order " Dragos Tatulea
@ 2026-06-13  9:53   ` Pavel Begunkov
  2026-06-13 14:09     ` Dragos Tatulea
  0 siblings, 1 reply; 5+ messages in thread
From: Pavel Begunkov @ 2026-06-13  9:53 UTC (permalink / raw)
  To: Dragos Tatulea, Donald Hunter, Jakub Kicinski, David S. Miller,
	Eric Dumazet, Paolo Abeni, Simon Horman, Andrew Lunn, Jens Axboe
  Cc: Yael Chemla, Tariq Toukan, netdev, linux-kernel, io-uring

On 6/12/26 22:17, Dragos Tatulea wrote:
> This adds observability for the io_uring zcrx rx-buf-len configuration.

It might be nicer to look it up in the queue, e.g. rxq->mp_params,
and make it a queue attribute instead of zcrx specific one. In either
case, no objections.

Acked-by: Pavel Begunkov <asml.silence@gmail.com>

-- 
Pavel Begunkov


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2 1/2] netdev: expose io_uring rx_page_order order via netlink
  2026-06-13  9:53   ` Pavel Begunkov
@ 2026-06-13 14:09     ` Dragos Tatulea
  2026-06-14  0:02       ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: Dragos Tatulea @ 2026-06-13 14:09 UTC (permalink / raw)
  To: Pavel Begunkov, Donald Hunter, Jakub Kicinski, David S. Miller,
	Eric Dumazet, Paolo Abeni, Simon Horman, Andrew Lunn, Jens Axboe
  Cc: Yael Chemla, Tariq Toukan, netdev, linux-kernel, io-uring



On 13.06.26 11:53, Pavel Begunkov wrote:
> On 6/12/26 22:17, Dragos Tatulea wrote:
>> This adds observability for the io_uring zcrx rx-buf-len configuration.
> 
> It might be nicer to look it up in the queue, e.g. rxq->mp_params,
> and make it a queue attribute instead of zcrx specific one. In either
> case, no objections.
> 
In io_pp_nl_fill() or in page_pool_nl_fill() as it was done in v1 for order?

Thanks,
Dragos

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2 1/2] netdev: expose io_uring rx_page_order order via netlink
  2026-06-13 14:09     ` Dragos Tatulea
@ 2026-06-14  0:02       ` Jakub Kicinski
  0 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2026-06-14  0:02 UTC (permalink / raw)
  To: Dragos Tatulea
  Cc: Pavel Begunkov, Donald Hunter, David S. Miller, Eric Dumazet,
	Paolo Abeni, Simon Horman, Andrew Lunn, Jens Axboe, Yael Chemla,
	Tariq Toukan, netdev, linux-kernel, io-uring

On Sat, 13 Jun 2026 16:09:03 +0200 Dragos Tatulea wrote:
> On 13.06.26 11:53, Pavel Begunkov wrote:
> > On 6/12/26 22:17, Dragos Tatulea wrote:  
> >> This adds observability for the io_uring zcrx rx-buf-len configuration.  
> > 
> > It might be nicer to look it up in the queue, e.g. rxq->mp_params,
> > and make it a queue attribute instead of zcrx specific one. In either
> > case, no objections.
>   
> In io_pp_nl_fill() or in page_pool_nl_fill() as it was done in v1 for order?

It's fine. We decided to make the "page size" a memory provider
property, now we're going back to making it a queue level param? 
Like my RFC had that everyone hated so much? Sigh.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-06-14  0:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-12 21:17 [PATCH net-next v2 0/2] netdev: expose page pool order via netlink Dragos Tatulea
2026-06-12 21:17 ` [PATCH net-next v2 1/2] netdev: expose io_uring rx_page_order " Dragos Tatulea
2026-06-13  9:53   ` Pavel Begunkov
2026-06-13 14:09     ` Dragos Tatulea
2026-06-14  0:02       ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox