From: Lorenzo Bianconi <lorenzo@kernel.org>
To: netdev@vger.kernel.org
Cc: ilias.apalodimas@linaro.org, hawk@kernel.org,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, corbet@lwn.net, linux-doc@vger.kernel.org,
jbrouer@redhat.com, lorenzo.bianconi@redhat.com
Subject: [PATCH v2 net-next] Documentation: update networking/page_pool.rst with ethtool APIs
Date: Mon, 6 Jun 2022 22:15:45 +0200 [thread overview]
Message-ID: <8c1f582d286fd5a7406dfff895eea39bb8fedca6.1654546043.git.lorenzo@kernel.org> (raw)
Update page_pool documentation with page_pool ethtool stats APIs.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
Changes since v1:
- get rid of literal markup
---
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..a40203297cd3 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
next reply other threads:[~2022-06-06 20:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 20:15 Lorenzo Bianconi [this message]
2022-06-08 4:00 ` [PATCH v2 net-next] Documentation: update networking/page_pool.rst with ethtool APIs Jakub Kicinski
2022-06-08 14:20 ` Lorenzo Bianconi
2022-07-03 22:47 ` kernel test robot
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=8c1f582d286fd5a7406dfff895eea39bb8fedca6.1654546043.git.lorenzo@kernel.org \
--to=lorenzo@kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jbrouer@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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