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

From: Shenwei Wang
Date: Tue Nov 15 2022 - 15:50:34 EST


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@xxxxxxx>
---
include/net/page_pool.h | 2 ++
1 file changed, 2 insertions(+)

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)
{
--
2.34.1