Patch "net/mlx5e: Specify numa node when allocating drop rq" has been added to the 4.15-stable tree
This is a note to let you know that I've just added the patch titled
net/mlx5e: Specify numa node when allocating drop rq
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-mlx5e-specify-numa-node-when-allocating-drop-rq.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Tue Mar 6 19:02:56 PST 2018
From: Gal Pressman <[email protected]>
Date: Thu, 25 Jan 2018 18:00:41 +0200
Subject: net/mlx5e: Specify numa node when allocating drop rq
From: Gal Pressman <[email protected]>
[ Upstream commit 2f0db87901698cd73d828cc6fb1957b8916fc911 ]
When allocating a drop rq, no numa node is explicitly set which means allocations are done on node zero. This is not necessarily the nearest numa node to the HCA, and even worse, might even be a memoryless numa node.
Choose the numa_node given to us by the pci device in order to properly allocate the coherent dma memory instead of assuming zero is valid.
--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +8 -2
@@ -1911,13 +1911,16 @@ static void mlx5e_build_rq_param(struct param->wq.linear =1 ; } -static void mlx5e_build_drop_rq_param (struct mlx5e_rq_param *param) +static void mlx5e_build_drop_rq_param (struct mlx5_core_dev *mdev, +struct mlx5e_rq_param *param) {void *rqc = param->rqc;void *wq =MLX5_ADDR_OF (rqc, rqc, wq);MLX5_SET (wq, wq, wq_type,MLX5_WQ_TYPE_LINKED_LIST );MLX5_SET (wq, wq, log_wq_stride,ilog2 (sizeof (struct mlx5e_rx_wqe ))); + + param->wq.buf_numa_node =dev_to_node (&mdev->pdev->dev); } static void mlx5e_build_sq_param_common(struct mlx5e_priv *priv,
@@ -2774,6 +2777,9 @@ static int mlx5e_alloc_drop_cq(struct mlstruct mlx5e_cq *cq, struct mlx5e_cq_param *param) { + param->wq.buf_numa_node = dev_to_node(&mdev->pdev->dev); + param->wq.db_numa_node =dev_to_node (&mdev->pdev->dev); +return mlx5e_alloc_cq_common (mdev, param, cq); }
@@ -2785,7 +2791,7 @@ static int mlx5e_open_drop_rq(struct mlxstruct mlx5e_cq *cq = &drop_rq->cq;int err; -mlx5e_build_drop_rq_param (&rq_param); +mlx5e_build_drop_rq_param (mdev, &rq_param); err =mlx5e_alloc_drop_cq (mdev, cq, &cq_param);if (err)
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/net-mlx5e-specify-numa-node-when-allocating-drop-rq.patch queue-4.15/net-mlx5e-fix-tcp-checksum-in-lro-buffers.patch