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: <DC77YRDDLDV2.2RNW77Q8HPLTH@nvidia.com>
Date: Wed, 20 Aug 2025 11:30:42 +0000
From: "Dragos Tatulea" <dtatulea@...dia.com>
To: "Jakub Kicinski" <kuba@...nel.org>, <davem@...emloft.net>
Cc: <netdev@...r.kernel.org>, <edumazet@...gle.com>, <pabeni@...hat.com>,
 <andrew+netdev@...n.ch>, <horms@...nel.org>, <almasrymina@...gle.com>,
 <michael.chan@...adcom.com>, <tariqt@...dia.com>, <hawk@...nel.org>,
 <ilias.apalodimas@...aro.org>, <alexanderduyck@...com>, <sdf@...ichev.me>
Subject: Re: [PATCH net-next 11/15] net: page_pool: add helper to pre-check
 if PP will be unreadable

On Wed Aug 20, 2025 at 2:57 AM UTC, Jakub Kicinski wrote:
> mlx5 pokes into the rxq state to check if the queue has a memory
> provider, and therefore whether it may produce unreable mem.
> Add a helper for doing this in the page pool API. fbnic will want
> a similar thing (tho, for a slightly different reason).
>

Thanks for taking this up!

> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
>  include/net/page_pool/helpers.h                   |  9 +++++++++
>  drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 ++--------
>  net/core/page_pool.c                              |  8 ++++++++
>  3 files changed, 19 insertions(+), 8 deletions(-)
>
> diff --git a/include/net/page_pool/helpers.h b/include/net/page_pool/helpers.h
> index aa3719f28216..307c2436fa12 100644
> --- a/include/net/page_pool/helpers.h
> +++ b/include/net/page_pool/helpers.h
> @@ -505,6 +505,15 @@ static inline void page_pool_nid_changed(struct page_pool *pool, int new_nid)
>  		page_pool_update_nid(pool, new_nid);
>  }
>  
> +bool __page_pool_rxq_wants_unreadable(struct net_device *dev, unsigned int qid);
> +
> +static inline bool
> +page_pool_rxq_wants_unreadable(const struct page_pool_params *pp_params)
> +{
> +	return __page_pool_rxq_wants_unreadable(pp_params->netdev,
> +						pp_params->queue_idx);
> +}
> +
Why not do this in the caller and have just a
page_pool_rxq_wants_unreadable() instead? It does make the code more
succint in the next patch but it looks weird as a generic function.
Subjective opinion though.

Thanks,
Dragos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ