* [PATCH v2 net-next] Documentation: update networking/page_pool.rst with ethtool APIs
@ 2022-06-06 20:15 Lorenzo Bianconi
2022-06-08 4:00 ` Jakub Kicinski
2022-07-03 22:47 ` kernel test robot
0 siblings, 2 replies; 4+ messages in thread
From: Lorenzo Bianconi @ 2022-06-06 20:15 UTC (permalink / raw)
To: netdev
Cc: ilias.apalodimas, hawk, davem, edumazet, kuba, pabeni, corbet,
linux-doc, jbrouer, lorenzo.bianconi
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 net-next] Documentation: update networking/page_pool.rst with ethtool APIs
2022-06-06 20:15 [PATCH v2 net-next] Documentation: update networking/page_pool.rst with ethtool APIs Lorenzo Bianconi
@ 2022-06-08 4:00 ` Jakub Kicinski
2022-06-08 14:20 ` Lorenzo Bianconi
2022-07-03 22:47 ` kernel test robot
1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2022-06-08 4:00 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: netdev, ilias.apalodimas, hawk, davem, edumazet, pabeni, corbet,
linux-doc, jbrouer, lorenzo.bianconi
On Mon, 6 Jun 2022 22:15:45 +0200 Lorenzo Bianconi wrote:
> 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
This is not what Andrew and I meant, I don't think. The suggestion was
to put the information in kdoc of the function, in the source code, and
then render the kdoc here by adding something like:
.. kernel-doc:: whatever/the/source/is.c
:identifiers: page_pool_ethtool_stats_get_strings page_pool_ethtool_stats_get_count page_pool_ethtool_stats_get
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 net-next] Documentation: update networking/page_pool.rst with ethtool APIs
2022-06-08 4:00 ` Jakub Kicinski
@ 2022-06-08 14:20 ` Lorenzo Bianconi
0 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Bianconi @ 2022-06-08 14:20 UTC (permalink / raw)
To: Jakub Kicinski
Cc: netdev, ilias.apalodimas, hawk, davem, edumazet, pabeni, corbet,
linux-doc, jbrouer, lorenzo.bianconi
[-- Attachment #1: Type: text/plain, Size: 721 bytes --]
> On Mon, 6 Jun 2022 22:15:45 +0200 Lorenzo Bianconi wrote:
> > 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
>
> This is not what Andrew and I meant, I don't think. The suggestion was
> to put the information in kdoc of the function, in the source code, and
> then render the kdoc here by adding something like:
>
> .. kernel-doc:: whatever/the/source/is.c
> :identifiers: page_pool_ethtool_stats_get_strings page_pool_ethtool_stats_get_count page_pool_ethtool_stats_get
>
ack, I misunderstood Jonathan's comments. I will fix it.
Regards,
Lorenzo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 net-next] Documentation: update networking/page_pool.rst with ethtool APIs
2022-06-06 20:15 [PATCH v2 net-next] Documentation: update networking/page_pool.rst with ethtool APIs Lorenzo Bianconi
2022-06-08 4:00 ` Jakub Kicinski
@ 2022-07-03 22:47 ` kernel test robot
1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-07-03 22:47 UTC (permalink / raw)
To: Lorenzo Bianconi, netdev
Cc: kbuild-all, ilias.apalodimas, hawk, davem, edumazet, kuba,
pabeni, corbet, linux-doc, jbrouer, lorenzo.bianconi
Hi Lorenzo,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Lorenzo-Bianconi/Documentation-update-networking-page_pool-rst-with-ethtool-APIs/20220607-041741
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 58f9d52ff689a262bec7f5713c07f5a79e115168
reproduce: make htmldocs
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> Documentation/networking/page_pool.rst:154: WARNING: Unexpected indentation.
vim +154 Documentation/networking/page_pool.rst
151
152 * page_pool_ethtool_stats_get_strings(): reports page_pool ethtool stats
153 strings according to the struct page_pool_stats
> 154 * rx_pp_alloc_fast
155 * rx_pp_alloc_slow
156 * rx_pp_alloc_slow_ho
157 * rx_pp_alloc_empty
158 * rx_pp_alloc_refill
159 * rx_pp_alloc_waive
160 * rx_pp_recycle_cached
161 * rx_pp_recycle_cache_full
162 * rx_pp_recycle_ring
163 * rx_pp_recycle_ring_full
164 * rx_pp_recycle_released_ref
165
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-03 22:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-06 20:15 [PATCH v2 net-next] Documentation: update networking/page_pool.rst with ethtool APIs Lorenzo Bianconi
2022-06-08 4:00 ` Jakub Kicinski
2022-06-08 14:20 ` Lorenzo Bianconi
2022-07-03 22:47 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).