[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221115204951.370217-2-shenwei.wang@nxp.com>
Date: Tue, 15 Nov 2022 14:49:49 -0600
From: Shenwei Wang <shenwei.wang@....com>
To: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: Jesper Dangaard Brouer <hawk@...nel.org>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
John Fastabend <john.fastabend@...il.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
imx@...ts.linux.dev, Shenwei Wang <shenwei.wang@....com>
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 <shenwei.wang@....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
Powered by blists - more mailing lists