[v5,1/3] net: page_pool: export page_pool_stats definition

Message ID 20221115204951.370217-2-shenwei.wang@nxp.com
State New
Headers
Series net: fec: add xdp and page pool statistics |

Commit Message

Shenwei Wang Nov. 15, 2022, 8:49 p.m. UTC
  The definition of the 'struct page_pool_stats' is required even when
the CONFIG_PAGE_POOL_STATS is not defined. Add an empty page_pool_stats
stub, Otherwise it would require the drivers to handle the case of
CONFIG_PAGE_POOL_STATS undefined.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
---
 include/net/page_pool.h | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/include/net/page_pool.h b/include/net/page_pool.h
index 813c93499f20..516d943bc1eb 100644
--- a/include/net/page_pool.h
+++ b/include/net/page_pool.h
@@ -129,6 +129,8 @@  u64 *page_pool_ethtool_stats_get(u64 *data, void *stats);
 bool page_pool_get_stats(struct page_pool *pool,
 			 struct page_pool_stats *stats);
 #else
+struct page_pool_stats {
+};
 
 static inline int page_pool_ethtool_stats_get_count(void)
 {