From: Mina Almasry <almasrymina@google.com>
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Mina Almasry <almasrymina@google.com>,
Joshua Washington <joshwash@google.com>,
Harshitha Ramamurthy <hramamurthy@google.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Jesper Dangaard Brouer <hawk@kernel.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Simon Horman <horms@kernel.org>,
Willem de Bruijn <willemb@google.com>
Subject: [PATCH net v1 1/2] page_pool: expose max page pool ring size
Date: Wed, 5 Nov 2025 20:07:57 +0000 [thread overview]
Message-ID: <20251105200801.178381-1-almasrymina@google.com> (raw)
Expose this as a constant so we can reuse it in drivers.
Signed-off-by: Mina Almasry <almasrymina@google.com>
---
include/net/page_pool/types.h | 2 ++
net/core/page_pool.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h
index 1509a536cb85..5edba3122b10 100644
--- a/include/net/page_pool/types.h
+++ b/include/net/page_pool/types.h
@@ -58,6 +58,8 @@ struct pp_alloc_cache {
netmem_ref cache[PP_ALLOC_CACHE_SIZE];
};
+#define PAGE_POOL_MAX_RING_SIZE 16384
+
/**
* struct page_pool_params - page pool parameters
* @fast: params accessed frequently on hotpath
diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index 1a5edec485f1..7b2808da294f 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -211,7 +211,7 @@ static int page_pool_init(struct page_pool *pool,
return -EINVAL;
if (pool->p.pool_size)
- ring_qsize = min(pool->p.pool_size, 16384);
+ ring_qsize = min(pool->p.pool_size, PAGE_POOL_MAX_RING_SIZE);
/* DMA direction is either DMA_FROM_DEVICE or DMA_BIDIRECTIONAL.
* DMA_BIDIRECTIONAL is for allowing page used for DMA sending,
base-commit: 327c20c21d80e0d87834b392d83ae73c955ad8ff
--
2.51.2.1026.g39e6a42477-goog
next reply other threads:[~2025-11-05 20:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 20:07 Mina Almasry [this message]
2025-11-05 20:07 ` [PATCH net v1 2/2] gve: use max allowed ring size for ZC page_pools Mina Almasry
2025-11-05 21:58 ` Jesper Dangaard Brouer
2025-11-05 22:44 ` Mina Almasry
2025-11-05 22:15 ` Harshitha Ramamurthy
2025-11-05 22:46 ` Mina Almasry
2025-11-06 1:11 ` Jakub Kicinski
2025-11-06 1:56 ` Mina Almasry
2025-11-06 2:22 ` Jakub Kicinski
2025-11-06 2:56 ` Mina Almasry
2025-11-06 17:25 ` Dragos Tatulea
2025-11-07 1:18 ` Jakub Kicinski
2025-11-07 13:35 ` Dragos Tatulea
2025-11-08 2:04 ` Jakub Kicinski
2025-11-10 12:36 ` Pavel Begunkov
2025-11-10 12:48 ` Dragos Tatulea
2025-11-05 21:56 ` [PATCH net v1 1/2] page_pool: expose max page pool ring size Jesper Dangaard Brouer
2025-11-05 22:56 ` Mina Almasry
2025-11-06 13:12 ` Ilias Apalodimas
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=20251105200801.178381-1-almasrymina@google.com \
--to=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=hramamurthy@google.com \
--cc=ilias.apalodimas@linaro.org \
--cc=joshwash@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.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
all inboxes | Powered by JetHome®