From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org, corbet@lwn.net,
tariqt@nvidia.com, dtatulea@nvidia.com,
linux-doc@vger.kernel.org, hawk@kernel.org,
ilias.apalodimas@linaro.org, Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 3/4] docs: page_pool: drop the mention of the legacy stats API
Date: Tue, 26 May 2026 08:57:21 -0700 [thread overview]
Message-ID: <20260526155722.2790742-4-kuba@kernel.org> (raw)
In-Reply-To: <20260526155722.2790742-1-kuba@kernel.org>
The Netlink support for querying page pool stats has been
proven out in production, let's remove the mention of the
helper meant for dumping page pool stats into ethtool -S
from the docs.
Call out in the kdoc that this API is deprecated.
Some drivers may not be able to use the Netlink API
(if page pool is shared across netdevs). So the old API
is not _completely_ dead. But we shouldn't advertise it.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
Documentation/networking/page_pool.rst | 46 +++++++-------------------
net/core/page_pool.c | 3 ++
2 files changed, 15 insertions(+), 34 deletions(-)
diff --git a/Documentation/networking/page_pool.rst b/Documentation/networking/page_pool.rst
index 5409c68be3fc..817f8b78d246 100644
--- a/Documentation/networking/page_pool.rst
+++ b/Documentation/networking/page_pool.rst
@@ -43,8 +43,17 @@ Architecture overview
Monitoring
==========
-Information about page pools on the system can be accessed via the netdev
-genetlink family (see Documentation/netlink/specs/netdev.yaml).
+Information about allocated page pools, their memory use, recycling statistics
+etc. can be accessed via the netdev genetlink family
+(see Documentation/netlink/specs/netdev.yaml).
+
+Statistics
+----------
+
+.. kernel-doc:: include/net/page_pool/types.h
+ :identifiers: struct page_pool_recycle_stats
+ struct page_pool_alloc_stats
+ struct page_pool_stats
API interface
=============
@@ -74,7 +83,7 @@ that NAPI context, the page pool may safely access consumer-side resources
page_pool_get_dma_addr page_pool_get_dma_dir
.. kernel-doc:: net/core/page_pool.c
- :identifiers: page_pool_put_page_bulk page_pool_get_stats
+ :identifiers: page_pool_put_page_bulk
DMA sync
--------
@@ -109,22 +118,6 @@ Unless the driver author really understands page pool internals
it's recommended to always use ``offset = 0``, ``max_len = PAGE_SIZE``
with fragmented page pools.
-Stats API and structures
-------------------------
-If the kernel is configured with ``CONFIG_PAGE_POOL_STATS=y``, the API
-page_pool_get_stats() and structures described below are available.
-It takes a pointer to a ``struct page_pool`` and a pointer to a struct
-page_pool_stats allocated by the caller.
-
-Older drivers expose page pool statistics via ethtool or debugfs.
-The same statistics are accessible via the netlink netdev family
-in a driver-independent fashion.
-
-.. kernel-doc:: include/net/page_pool/types.h
- :identifiers: struct page_pool_recycle_stats
- struct page_pool_alloc_stats
- struct page_pool_stats
-
Coding examples
===============
@@ -178,21 +171,6 @@ NAPI poller
}
}
-Stats
------
-
-.. code-block:: c
-
- #ifdef CONFIG_PAGE_POOL_STATS
- /* retrieve stats */
- struct page_pool_stats stats = { 0 };
- if (page_pool_get_stats(page_pool, &stats)) {
- /* perhaps the driver reports statistics with ethool */
- ethtool_print_allocation_stats(&stats.alloc_stats);
- ethtool_print_recycle_stats(&stats.recycle_stats);
- }
- #endif
-
Driver unload
-------------
diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index 6e576dec80db..9a87062134d4 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -76,6 +76,9 @@ static const char pp_stats[][ETH_GSTRING_LEN] = {
* @pool: pool from which page was allocated
* @stats: struct page_pool_stats to fill in
*
+ * Deprecated driver API for querying stats. Page pool stats can be queried
+ * via netdev Netlink.
+ *
* Retrieve statistics about the page_pool. This API is only available
* if the kernel has been configured with ``CONFIG_PAGE_POOL_STATS=y``.
* A pointer to a caller allocated struct page_pool_stats structure
--
2.54.0
next prev parent reply other threads:[~2026-05-26 15:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 15:57 [PATCH net-next 0/4] docs: page_pool: tweaks and updates Jakub Kicinski
2026-05-26 15:57 ` [PATCH net-next 1/4] docs: net: page_pool: drop reference to removed PP_FLAG_PAGE_FRAG Jakub Kicinski
2026-05-26 19:18 ` Nicolai Buchwitz
2026-05-26 15:57 ` [PATCH net-next 2/4] docs: clarify page pool NAPI consumer requirement Jakub Kicinski
2026-05-26 19:22 ` Nicolai Buchwitz
2026-05-26 15:57 ` Jakub Kicinski [this message]
2026-05-26 19:25 ` [PATCH net-next 3/4] docs: page_pool: drop the mention of the legacy stats API Nicolai Buchwitz
2026-05-26 15:57 ` [PATCH net-next 4/4] net: make page_pool_get_stats() void Jakub Kicinski
2026-05-26 19:36 ` Nicolai Buchwitz
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=20260526155722.2790742-4-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tariqt@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