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] [day] [month] [year] [list]
Message-ID: <CAC_iWjLGw7eEYTUwwNjFKy2yYFdZRtwafHxjrDyBo-ugvhbkhQ@mail.gmail.com>
Date: Fri, 24 Oct 2025 12:11:49 +0300
From: Ilias Apalodimas <ilias.apalodimas@...aro.org>
To: Tariq Toukan <tariqt@...dia.com>
Cc: Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew+netdev@...n.ch>, 
	"David S. Miller" <davem@...emloft.net>, Saeed Mahameed <saeedm@...dia.com>, Mark Bloch <mbloch@...dia.com>, 
	Leon Romanovsky <leon@...nel.org>, Jesper Dangaard Brouer <hawk@...nel.org>, netdev@...r.kernel.org, 
	linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Gal Pressman <gal@...dia.com>, Dragos Tatulea <dtatulea@...dia.com>
Subject: Re: [PATCH net-next 1/2] net: page_pool: Expose internal limit

On Mon, 22 Sept 2025 at 12:19, Tariq Toukan <tariqt@...dia.com> wrote:
>
> From: Dragos Tatulea <dtatulea@...dia.com>
>
> page_pool_init() has a check for pool_size < 32K. But page_pool users
> have no access to this limit so there is no way to trim the pool_size in
> advance. The E2BIG error doesn't help much for retry as the driver has
> to guess the next size and retry.
>
> This patch exposes this limit to in the page_pool header.
>
> Signed-off-by: Dragos Tatulea <dtatulea@...dia.com>
> Signed-off-by: Tariq Toukan <tariqt@...dia.com>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@...aro.org>

> ---
>  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..22aee9a65a26 100644
> --- a/include/net/page_pool/types.h
> +++ b/include/net/page_pool/types.h
> @@ -163,6 +163,8 @@ struct pp_memory_provider_params {
>         const struct memory_provider_ops *mp_ops;
>  };
>
> +#define PAGE_POOL_SIZE_LIMIT 32768
> +
>  struct page_pool {
>         struct page_pool_params_fast p;
>
> diff --git a/net/core/page_pool.c b/net/core/page_pool.c
> index 36a98f2bcac3..1f0fdfb02f08 100644
> --- a/net/core/page_pool.c
> +++ b/net/core/page_pool.c
> @@ -214,7 +214,7 @@ static int page_pool_init(struct page_pool *pool,
>                 ring_qsize = pool->p.pool_size;
>
>         /* Sanity limit mem that can be pinned down */
> -       if (ring_qsize > 32768)
> +       if (ring_qsize > PAGE_POOL_SIZE_LIMIT)
>                 return -E2BIG;
>
>         /* DMA direction is either DMA_FROM_DEVICE or DMA_BIDIRECTIONAL.
> --
> 2.31.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ