From: Dragos Tatulea <dtatulea@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Donald Hunter <donald.hunter@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>
Cc: <dtatulea@nvidia.com>, Yael Chemla <ychemla@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH net-next] netdev: expose page pool order via netlink
Date: Thu, 11 Jun 2026 19:12:32 +0300 [thread overview]
Message-ID: <20260611161235.3807332-1-dtatulea@nvidia.com> (raw)
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
next reply other threads:[~2026-06-11 16:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 16:12 Dragos Tatulea [this message]
2026-06-11 20:18 ` [PATCH net-next] netdev: expose page pool order via netlink Jakub Kicinski
2026-06-11 21:18 ` Dragos Tatulea
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=20260611161235.3807332-1-dtatulea@nvidia.com \
--to=dtatulea@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tariqt@nvidia.com \
--cc=ychemla@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox