2022-11-15 21:20:55

by Shenwei Wang

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

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 <[email protected]>
---
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