Received: by 10.223.185.116 with SMTP id b49csp5458246wrg; Wed, 7 Mar 2018 12:06:27 -0800 (PST) X-Google-Smtp-Source: AG47ELspRfR8wOJYXiteDQoVD+UycJAPCoPts5k9yisXWNHCKQgpGuQVO+1cGP+t0KcwpIv0BpSD X-Received: by 10.101.82.1 with SMTP id o1mr19331569pgp.37.1520453187519; Wed, 07 Mar 2018 12:06:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520453187; cv=none; d=google.com; s=arc-20160816; b=F3MWaevYwM/pbi01ph1I+qK+4+EnLQl0ooCj8/a/G9iZERtiguOE8PKJopQLIpNGXi vR4pwx00Wq7Zvpzm2mvqHzfQBstfrHCE14zm1cyeeEe8O/17urW0BHxIZt4XsGswBNBO l1l8vlX8BgBrrkGPe3zTBs//CsW3QXQMYtIctOaNIxBGepqRoDXUgUMLtFHhRFrBC950 iZfGs8CwL71f+HowyCbDraT6alS+xSeimMCiLftTU5TBacRjmWAeiGVAESWVwyTs/MiU 4MbWhHqJuepaHybIgXeNHrhQ0HnNEXV3Bj6vRUBbOtHW3nQeb093ei83P0QVsR9wX4EF rQNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=uP4eP94G4VB0UOYVwLQsbQtLjOPzXouOBhRpWx8/wRk=; b=Mow3/shl7KNaKbQO0BnZ/wVWpNOKN4QdguaQ0b9ozWVMM+FaBBIzm9VzCuBFkuC1yS naIw0KQ61zVbS+T5v7cJbjS0vachV5O9VyOz/m39WcdhQZhT9nSAn5tHtEhUFQA8mAM6 7Weh1KtE0QTzhFtMK9cb6ZYmd0R6+fJAGx5inSEkgESg4CfGPcvHE9ByHYtqNN0ymCip i9RF8L4QkPqZHezhyfs6UwzZP+j6rXkJ/cB7FDQIPbHjjS/GMCu1NWn+BM1qFLno1RFi +gK1bRxbKyXuAEZtEssM7pebCAymaDUUvmGVXjgcluXRQ4A2cFt2kCQrg2PWXA1hZ6hz 0dBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si11766599pgs.752.2018.03.07.12.06.12; Wed, 07 Mar 2018 12:06:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935090AbeCGUE5 (ORCPT + 99 others); Wed, 7 Mar 2018 15:04:57 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44536 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965509AbeCGTqT (ORCPT ); Wed, 7 Mar 2018 14:46:19 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8C0001032; Wed, 7 Mar 2018 19:46:18 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gal Pressman , Saeed Mahameed Subject: [PATCH 4.14 050/110] net/mlx5e: Specify numa node when allocating drop rq Date: Wed, 7 Mar 2018 11:38:33 -0800 Message-Id: <20180307191046.119870190@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180307191039.748351103@linuxfoundation.org> References: <20180307191039.748351103@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gal Pressman [ 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. Fixes: 556dd1b9c313 ("net/mlx5e: Set drop RQ's necessary parameters only") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -1918,13 +1918,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, @@ -2778,6 +2781,9 @@ static int mlx5e_alloc_drop_cq(struct ml struct 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); } @@ -2789,7 +2795,7 @@ static int mlx5e_open_drop_rq(struct mlx struct 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)