On 06/11/2026 20:44, Jakub Kicinski wrote:
mlx4_en temporarily changes the node of the device around
mlx4_alloc_hwq_res() to place the queue buffers on the queue's node.
This is racy against other users of the device's node, e.g. mlx4_ib
allocating its own buffers at the same time.
Add a node argument to mlx4_alloc_hwq_res() and use
dma_alloc_coherent_node() for the queue buffer. mlx4_buf_alloc()
and the en_netdev page keep using the device's node.
The comment about the MTT allocation was stale, the MTT ICM is not
coherent and uses mlx4_dev->numa_node, which set_dev_node() did not
affect.
The doorbell record pages, which mlx4_db_alloc() allocates on demand
and shares between all queues, now always come from the device's node.
So far they ended up on the node of whichever queue happened to need
a new page.
Reviewed-by: Björn Töpel <bjorn@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Tariq Toukan <tariqt@nvidia.com>