[PATCH net-next] netdev: expose page pool order via netlink

From: Dragos Tatulea

Date: Thu Jun 11 2026 - 12:13:36 EST


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@xxxxxxxxxx>
Reviewed-by: Yael Chemla <ychemla@xxxxxxxxxx>
Reviewed-by: Tariq Toukan <tariqt@xxxxxxxxxx>

---
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