stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Aharon Landau <aharonl@mellanox.com>,
	Maor Gottlieb <maorg@mellanox.com>,
	Leon Romanovsky <leonro@mellanox.com>,
	Jason Gunthorpe <jgg@mellanox.com>,
	Sasha Levin <sashal@kernel.org>,
	linux-rdma@vger.kernel.org
Subject: [PATCH AUTOSEL 4.14 05/16] RDMA/mlx5: Set GRH fields in query QP on RoCE
Date: Thu,  7 May 2020 10:29:32 -0400	[thread overview]
Message-ID: <20200507142943.26848-5-sashal@kernel.org> (raw)
In-Reply-To: <20200507142943.26848-1-sashal@kernel.org>

From: Aharon Landau <aharonl@mellanox.com>

[ Upstream commit 2d7e3ff7b6f2c614eb21d0dc348957a47eaffb57 ]

GRH fields such as sgid_index, hop limit, et. are set in the QP context
when QP is created/modified.

Currently, when query QP is performed, we fill the GRH fields only if the
GRH bit is set in the QP context, but this bit is not set for RoCE. Adjust
the check so we will set all relevant data for the RoCE too.

Since this data is returned to userspace, the below is an ABI regression.

Fixes: d8966fcd4c25 ("IB/core: Use rdma_ah_attr accessor functions")
Link: https://lore.kernel.org/r/20200413132028.930109-1-leon@kernel.org
Signed-off-by: Aharon Landau <aharonl@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/infiniband/hw/mlx5/qp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 0cb60072c82f3..d835ef2ce23c0 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -4362,7 +4362,9 @@ static void to_rdma_ah_attr(struct mlx5_ib_dev *ibdev,
 	rdma_ah_set_path_bits(ah_attr, path->grh_mlid & 0x7f);
 	rdma_ah_set_static_rate(ah_attr,
 				path->static_rate ? path->static_rate - 5 : 0);
-	if (path->grh_mlid & (1 << 7)) {
+
+	if (path->grh_mlid & (1 << 7) ||
+	    ah_attr->type == RDMA_AH_ATTR_TYPE_ROCE) {
 		u32 tc_fl = be32_to_cpu(path->tclass_flowlabel);
 
 		rdma_ah_set_grh(ah_attr, NULL,
-- 
2.20.1


  parent reply	other threads:[~2020-05-07 14:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 14:29 [PATCH AUTOSEL 4.14 01/16] RDMA/mlx4: Initialize ib_spec on the stack Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 02/16] nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 03/16] vfio: avoid possible overflow in vfio_iommu_type1_pin_pages Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 04/16] scsi: target/iblock: fix WRITE SAME zeroing Sasha Levin
2020-05-07 14:29 ` Sasha Levin [this message]
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 06/16] dmaengine: pch_dma.c: Avoid data race between probe and irq handler Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 07/16] dmaengine: mmp_tdma: Reset channel error on release Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 08/16] vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn() Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 09/16] ALSA: hda: Match both PCI ID and SSID for driver blacklist Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 10/16] cpufreq: intel_pstate: Only mention the BIOS disabling turbo mode once Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 11/16] dmaengine: dmatest: Fix iteration non-stop logic Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 12/16] ALSA: hda/hdmi: fix race in monitor detection during probe Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 13/16] drm/qxl: lost qxl_bo_kunmap_atomic_page in qxl_image_init_helper() Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 14/16] ALSA: opti9xx: shut up gcc-10 range warning Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 15/16] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.14 16/16] iommu/qcom: Fix local_base status check Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200507142943.26848-5-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=aharonl@mellanox.com \
    --cc=jgg@mellanox.com \
    --cc=leonro@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@mellanox.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).