lkml.org 
[lkml]   [2022]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v5 1/3] net: page_pool: export page_pool_stats definition
Date
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(+)

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
\
 
 \ /
  Last update: 2022-11-15 21:51    [W:0.105 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site