[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250522153013.62ac43be@kernel.org>
Date: Thu, 22 May 2025 15:30:13 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Tariq Toukan <tariqt@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>, Paolo Abeni
<pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>, "Andrew Lunn"
<andrew+netdev@...n.ch>, Saeed Mahameed <saeedm@...dia.com>, Leon
Romanovsky <leon@...nel.org>, Richard Cochran <richardcochran@...il.com>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
<daniel@...earbox.net>, Jesper Dangaard Brouer <hawk@...nel.org>, John
Fastabend <john.fastabend@...il.com>, <netdev@...r.kernel.org>,
<linux-rdma@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<bpf@...r.kernel.org>, Moshe Shemesh <moshe@...dia.com>, Mark Bloch
<mbloch@...dia.com>, Gal Pressman <gal@...dia.com>, Cosmin Ratiu
<cratiu@...dia.com>, Dragos Tatulea <dtatulea@...dia.com>
Subject: Re: [PATCH net-next V2 06/11] net/mlx5e: SHAMPO: Separate pool for
headers
On Fri, 23 May 2025 00:41:21 +0300 Tariq Toukan wrote:
> Allocate a separate page pool for headers when SHAMPO is enabled.
> This will be useful for adding support to zc page pool, which has to be
> different from the headers page pool.
Could you explain why always allocate a separate pool?
For bnxt we do it only if ZC is enabled (or system pages are large),
see bnxt_separate_head_pool() and page_pool_is_unreadable().
Not sure if page_pool_is_unreadable() existed when this code
was written.
> - wq_size = BIT(MLX5_GET(wq, wqc, log_wq_sz));
> - *pool_size += (rq->mpwqe.shampo->hd_per_wqe * wq_size) /
> - MLX5E_SHAMPO_WQ_HEADER_PER_PAGE;
> +
> + /* separate page pool for shampo headers */
> + {
> + int wq_size = BIT(MLX5_GET(wq, wqc, log_wq_sz));
> + struct page_pool_params pp_params = { };
> + u32 pool_size;
A free standing code block? I this it's universally understood
to be very poor coding style..
Powered by blists - more mailing lists