From: Shenwei Wang <shenwei.wang@nxp.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Jesper Dangaard Brouer <hawk@kernel.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, Shenwei Wang <shenwei.wang@nxp.com>
Subject: [PATCH v4 1/2] net: page_pool: export page_pool_stats definition
Date: Tue, 15 Nov 2022 09:57:43 -0600 [thread overview]
Message-ID: <20221115155744.193789-2-shenwei.wang@nxp.com> (raw)
In-Reply-To: <20221115155744.193789-1-shenwei.wang@nxp.com>
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@nxp.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
next prev parent reply other threads:[~2022-11-15 15:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-15 15:57 [PATCH v4 0/2] net: fec: add xdp and page pool statistics Shenwei Wang
2022-11-15 15:57 ` Shenwei Wang [this message]
2022-11-15 17:12 ` [PATCH v4 1/2] net: page_pool: export page_pool_stats definition Andrew Lunn
2022-11-15 17:18 ` [EXT] " Shenwei Wang
2022-11-15 17:43 ` Andrew Lunn
2022-11-15 17:52 ` Shenwei Wang
2022-11-15 15:57 ` [PATCH v4 2/2] net: fec: add xdp and page pool statistics Shenwei Wang
2022-11-15 17:28 ` Andrew Lunn
2022-11-15 17:53 ` [EXT] " Shenwei Wang
2022-11-15 17:57 ` [PATCH v4 0/2] " Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221115155744.193789-2-shenwei.wang@nxp.com \
--to=shenwei.wang@nxp.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=imx@lists.linux.dev \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).