lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221115155744.193789-2-shenwei.wang@nxp.com>
Date:   Tue, 15 Nov 2022 09:57:43 -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 v4 1/2] 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. Otherwise, it is required
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, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/page_pool.h b/include/net/page_pool.h
index 813c93499f20..adfd4bb609a7 100644
--- a/include/net/page_pool.h
+++ b/include/net/page_pool.h
@@ -84,7 +84,6 @@ struct page_pool_params {
 	void *init_arg;
 };
 
-#ifdef CONFIG_PAGE_POOL_STATS
 struct page_pool_alloc_stats {
 	u64 fast; /* fast path allocations */
 	u64 slow; /* slow-path order 0 allocations */
@@ -117,6 +116,7 @@ struct page_pool_stats {
 	struct page_pool_recycle_stats recycle_stats;
 };
 
+#ifdef CONFIG_PAGE_POOL_STATS
 int page_pool_ethtool_stats_get_count(void);
 u8 *page_pool_ethtool_stats_get_strings(u8 *data);
 u64 *page_pool_ethtool_stats_get(u64 *data, void *stats);
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ