Skip to content

Commit f372581

Browse files
mosheshemesh2kuba-moo
authored andcommitted
net/mlx5: Ensure fw pages are always allocated on same NUMA
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: 311c7c7 ("net/mlx5e: Allocate DMA coherent memory on reader NUMA node") Signed-off-by: Moshe Shemesh <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Signed-off-by: Mark Bloch <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c7bdeed commit f372581

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static void free_4k(struct mlx5_core_dev *dev, u64 addr, u32 function)
291291
static int alloc_system_page(struct mlx5_core_dev *dev, u32 function)
292292
{
293293
struct device *device = mlx5_core_dma_dev(dev);
294-
int nid = dev_to_node(device);
294+
int nid = dev->priv.numa_node;
295295
struct page *page;
296296
u64 zero_addr = 1;
297297
u64 addr;

0 commit comments

Comments
 (0)