]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: Ensure fw pages are always allocated on same NUMA
authorMoshe Shemesh <moshe@nvidia.com>
Tue, 10 Jun 2025 15:15:06 +0000 (18:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2025 13:32:30 +0000 (15:32 +0200)
commitadb56e5a7199046aca14b1ebe077473141151e3d
tree8e01307df0b12240fbdddf2f92c99bf32bf4cdd5
parent7a41744e3854e27ce0d31a1dcf4d897a2328fddb
net/mlx5: Ensure fw pages are always allocated on same NUMA

[ Upstream commit f37258133c1e95e61db532e14067e28b4881bf24 ]

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@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Link: https://patch.msgid.link/20250610151514.1094735-2-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c