* [PATCH net-next] netdev: expose page pool order via netlink
@ 2026-06-11 16:12 Dragos Tatulea
2026-06-11 20:18 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Dragos Tatulea @ 2026-06-11 16:12 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Donald Hunter, Andrew Lunn
Cc: dtatulea, Yael Chemla, Tariq Toukan, netdev, linux-kernel
Add a new 'order' attribute to the page-pool netlink interface to expose
the page pool's allocation order (power of 2 page count).
This adds observability for the latest io_uring rx-buf-len configuration
for high order pages for zerocopy rx.
The order is added to the queue attribute instead of the nested io_uring
attribute as it can be useful to see high order page_pools for other
cases as well.
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 | 5 +++++
include/uapi/linux/netdev.h | 1 +
net/core/page_pool_user.c | 3 +++
tools/include/uapi/linux/netdev.h | 1 +
4 files changed, 10 insertions(+)
diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml
index 49862b666d7d..6d8032b64bbf 100644
--- a/Documentation/netlink/specs/netdev.yaml
+++ b/Documentation/netlink/specs/netdev.yaml
@@ -190,6 +190,10 @@ attribute-sets:
doc: io-uring memory provider information.
type: nest
nested-attributes: io-uring-provider-info
+ -
+ name: order
+ type: u32
+ doc: Page pool order (power of 2 page count per allocation).
-
name: page-pool-info
subset-of: page-pool
@@ -648,6 +652,7 @@ operations:
- detach-time
- dmabuf
- io-uring
+ - order
dump:
request:
attributes:
diff --git a/include/uapi/linux/netdev.h b/include/uapi/linux/netdev.h
index 7df1056a35fd..4c2e6df2e954 100644
--- a/include/uapi/linux/netdev.h
+++ b/include/uapi/linux/netdev.h
@@ -110,6 +110,7 @@ enum {
NETDEV_A_PAGE_POOL_DETACH_TIME,
NETDEV_A_PAGE_POOL_DMABUF,
NETDEV_A_PAGE_POOL_IO_URING,
+ NETDEV_A_PAGE_POOL_ORDER,
__NETDEV_A_PAGE_POOL_MAX,
NETDEV_A_PAGE_POOL_MAX = (__NETDEV_A_PAGE_POOL_MAX - 1)
diff --git a/net/core/page_pool_user.c b/net/core/page_pool_user.c
index ef4261c0e8ea..9536b79074bb 100644
--- a/net/core/page_pool_user.c
+++ b/net/core/page_pool_user.c
@@ -276,6 +276,9 @@ page_pool_nl_fill(struct sk_buff *rsp, const struct page_pool *pool,
nla_put_uint(rsp, NETDEV_A_PAGE_POOL_NAPI_ID, napi_id))
goto err_cancel;
+ if (nla_put_u32(rsp, NETDEV_A_PAGE_POOL_ORDER, pool->p.order))
+ goto err_cancel;
+
inflight = page_pool_inflight(pool, false);
refsz = PAGE_SIZE << pool->p.order;
if (nla_put_uint(rsp, NETDEV_A_PAGE_POOL_INFLIGHT, inflight) ||
diff --git a/tools/include/uapi/linux/netdev.h b/tools/include/uapi/linux/netdev.h
index 7df1056a35fd..4c2e6df2e954 100644
--- a/tools/include/uapi/linux/netdev.h
+++ b/tools/include/uapi/linux/netdev.h
@@ -110,6 +110,7 @@ enum {
NETDEV_A_PAGE_POOL_DETACH_TIME,
NETDEV_A_PAGE_POOL_DMABUF,
NETDEV_A_PAGE_POOL_IO_URING,
+ NETDEV_A_PAGE_POOL_ORDER,
__NETDEV_A_PAGE_POOL_MAX,
NETDEV_A_PAGE_POOL_MAX = (__NETDEV_A_PAGE_POOL_MAX - 1)
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] netdev: expose page pool order via netlink
2026-06-11 16:12 [PATCH net-next] netdev: expose page pool order via netlink Dragos Tatulea
@ 2026-06-11 20:18 ` Jakub Kicinski
2026-06-11 21:18 ` Dragos Tatulea
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2026-06-11 20:18 UTC (permalink / raw)
To: Dragos Tatulea
Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
Donald Hunter, Andrew Lunn, Yael Chemla, Tariq Toukan, netdev,
linux-kernel
On Thu, 11 Jun 2026 19:12:32 +0300 Dragos Tatulea wrote:
> Add a new 'order' attribute to the page-pool netlink interface to expose
> the page pool's allocation order (power of 2 page count).
>
> This adds observability for the latest io_uring rx-buf-len configuration
> for high order pages for zerocopy rx.
>
> The order is added to the queue attribute instead of the nested io_uring
> attribute as it can be useful to see high order page_pools for other
> cases as well.
Memory providers have a callback to populate their own attributes
(nl_fill). Sounds like we should expose rx_buf_len over that thing
instead of exposing the order which is more of a kernel internal?
Also please add checking the new attr to some selftest.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] netdev: expose page pool order via netlink
2026-06-11 20:18 ` Jakub Kicinski
@ 2026-06-11 21:18 ` Dragos Tatulea
0 siblings, 0 replies; 3+ messages in thread
From: Dragos Tatulea @ 2026-06-11 21:18 UTC (permalink / raw)
To: Jakub Kicinski
Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
Donald Hunter, Andrew Lunn, Yael Chemla, Tariq Toukan, netdev,
linux-kernel
On 11.06.26 22:18, Jakub Kicinski wrote:
> On Thu, 11 Jun 2026 19:12:32 +0300 Dragos Tatulea wrote:
>> Add a new 'order' attribute to the page-pool netlink interface to expose
>> the page pool's allocation order (power of 2 page count).
>>
>> This adds observability for the latest io_uring rx-buf-len configuration
>> for high order pages for zerocopy rx.
>>
>> The order is added to the queue attribute instead of the nested io_uring
>> attribute as it can be useful to see high order page_pools for other
>> cases as well.
>
> Memory providers have a callback to populate their own attributes
> (nl_fill). Sounds like we should expose rx_buf_len over that thing
> instead of exposing the order which is more of a kernel internal?
>
Sounds good. Will add it in v2.
> Also please add checking the new attr to some selftest.
Right. I added code in test_zcrx_large_chunks to check this.
I lost it on the way a couple of weeks ago and forgot about it.
Will add it back.
Thanks,
Dragos
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-11 21:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11 16:12 [PATCH net-next] netdev: expose page pool order via netlink Dragos Tatulea
2026-06-11 20:18 ` Jakub Kicinski
2026-06-11 21:18 ` Dragos Tatulea
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox