[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5e6f4582-4c4a-461f-8298-c9ce207eae25@linux.intel.com>
Date: Thu, 22 May 2025 10:57:01 +0200
From: Dawid Osuchowski <dawid.osuchowski@...ux.intel.com>
To: Tariq Toukan <tariqt@...dia.com>, "David S. Miller"
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
Andrew Lunn <andrew+netdev@...n.ch>
Cc: Saeed Mahameed <saeedm@...dia.com>, Leon Romanovsky <leon@...nel.org>,
netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org, Moshe Shemesh <moshe@...dia.com>,
Mark Bloch <mbloch@...dia.com>, Gal Pressman <gal@...dia.com>
Subject: Re: [PATCH net 1/2] net/mlx5: Ensure fw pages are always allocated on
same NUMA
On 2025-05-22 8:28 AM, Tariq Toukan wrote:
> From: Moshe Shemesh <moshe@...dia.com>
>
> When firmware asks the driver to allocate more pages, using event of
> give_pages, the driver should always allocate it from same NUMA, the
> original device NUMA. Current code uses dev_to_node() which can result
> in different NUMA as it is changed by other driver flows, such as
> mlx5_dma_zalloc_coherent_node(). Instead, use saved numa node for
> allocating firmware pages.
>
> Fixes: 311c7c71c9bb ("net/mlx5e: Allocate DMA coherent memory on reader NUMA node")
> Signed-off-by: Moshe Shemesh <moshe@...dia.com>
> Signed-off-by: Tariq Toukan <tariqt@...dia.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
> index 972e8e9df585..9bc9bd83c232 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
> @@ -291,7 +291,7 @@ static void free_4k(struct mlx5_core_dev *dev, u64 addr, u32 function)
> static int alloc_system_page(struct mlx5_core_dev *dev, u32 function)
> {
> struct device *device = mlx5_core_dma_dev(dev);
> - int nid = dev_to_node(device);
> + int nid = dev->priv.numa_node;
Reviewed-by: Dawid Osuchowski <dawid.osuchowski@...ux.intel.com>
Thanks,
Dawid
> struct page *page;
> u64 zero_addr = 1;
> u64 addr;
Powered by blists - more mailing lists