-commit f3c5264f452a5b0ac1de1f2f657efbabdea3c76a
-Author: Lorenzo Bianconi <lorenzo@kernel.org>
-Date: Tue Apr 12 18:31:58 2022 +0200
+From f3c5264f452a5b0ac1de1f2f657efbabdea3c76a Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo@kernel.org>
+Date: Tue, 12 Apr 2022 18:31:58 +0200
+Subject: [PATCH] net: page_pool: introduce ethtool stats
- net: page_pool: introduce ethtool stats
-
- Introduce page_pool APIs to report stats through ethtool and reduce
- duplicated code in each driver.
-
- Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
- Reviewed-by: Jakub Kicinski <kuba@kernel.org>
- Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
- Signed-off-by: David S. Miller <davem@davemloft.net>
+Introduce page_pool APIs to report stats through ethtool and reduce
+duplicated code in each driver.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
+Reviewed-by: Jakub Kicinski <kuba@kernel.org>
+Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ include/net/page_pool.h | 21 ++++++++++++++
+ net/core/page_pool.c | 63 ++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 83 insertions(+), 1 deletion(-)
--- a/include/net/page_pool.h
+++ b/include/net/page_pool.h
#include <trace/events/page_pool.h>
-@@ -42,6 +43,20 @@
+@@ -65,6 +66,20 @@ static void page_pool_producer_unlock(st
this_cpu_add(s->__stat, val); \
} while (0)
bool page_pool_get_stats(struct page_pool *pool,
struct page_pool_stats *stats)
{
-@@ -50,7 +65,13 @@ bool page_pool_get_stats(struct page_poo
+@@ -73,7 +88,13 @@ bool page_pool_get_stats(struct page_poo
if (!stats)
return false;
for_each_possible_cpu(cpu) {
const struct page_pool_recycle_stats *pcpu =
-@@ -66,6 +87,46 @@ bool page_pool_get_stats(struct page_poo
+@@ -89,6 +110,46 @@ bool page_pool_get_stats(struct page_poo
return true;
}
EXPORT_SYMBOL(page_pool_get_stats);