[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <2b0f8921096d45e1f279d1b7b99fe467f6f3dc6d.1652090091.git.lorenzo@kernel.org>
Date: Mon, 9 May 2022 12:00:01 +0200
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: netdev@...r.kernel.org
Cc: ilias.apalodimas@...aro.org, hawk@...nel.org, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
corbet@....net, linux-doc@...r.kernel.org, jbrouer@...hat.com,
lorenzo.bianconi@...hat.com
Subject: [PATCH net-next] Documentation: update networking/page_pool.rst with ethtool APIs
Update page_pool documentation with page_pool ethtool stats APIs.
Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
---
Documentation/networking/page_pool.rst | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/Documentation/networking/page_pool.rst b/Documentation/networking/page_pool.rst
index 5db8c263b0c6..ef5e18cf7cdf 100644
--- a/Documentation/networking/page_pool.rst
+++ b/Documentation/networking/page_pool.rst
@@ -146,6 +146,29 @@ The ``struct page_pool_recycle_stats`` has the following fields:
* ``ring_full``: page released from page pool because the ptr ring was full
* ``released_refcnt``: page released (and not recycled) because refcnt > 1
+The following APIs can be used to report page_pool stats through ethtool and
+avoid code duplication in each driver:
+
+* page_pool_ethtool_stats_get_strings(): reports page_pool ethtool stats
+ strings according to the ``struct page_pool_stats``
+ * ``rx_pp_alloc_fast``
+ * ``rx_pp_alloc_slow``
+ * ``rx_pp_alloc_slow_ho``
+ * ``rx_pp_alloc_empty``
+ * ``rx_pp_alloc_refill``
+ * ``rx_pp_alloc_waive``
+ * ``rx_pp_recycle_cached``
+ * ``rx_pp_recycle_cache_full``
+ * ``rx_pp_recycle_ring``
+ * ``rx_pp_recycle_ring_full``
+ * ``rx_pp_recycle_released_ref``
+
+* page_pool_ethtool_stats_get_count(): reports the number of stats defined in
+ the ethtool page_pool APIs
+
+* page_pool_ethtool_stats_get(u64 \*data, void \*stats): reports the page_pool statistics accounted in
+ the ``stats`` pointer in the ethtool ``data`` pointer provided by the caller
+
Coding examples
===============
--
2.35.3
Powered by blists - more mailing lists