Skip to content

Commit 2d7e3ff

Browse files
Aharon Landaujgunthorpe
authored andcommitted
RDMA/mlx5: Set GRH fields in query QP on RoCE
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: d8966fc ("IB/core: Use rdma_ah_attr accessor functions") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Aharon Landau <[email protected]> Reviewed-by: Maor Gottlieb <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 6e05197 commit 2d7e3ff

File tree

1 file changed

+3
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+3
-1
lines changed

drivers/infiniband/hw/mlx5/qp.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5558,7 +5558,9 @@ static void to_rdma_ah_attr(struct mlx5_ib_dev *ibdev,
55585558
rdma_ah_set_path_bits(ah_attr, path->grh_mlid & 0x7f);
55595559
rdma_ah_set_static_rate(ah_attr,
55605560
path->static_rate ? path->static_rate - 5 : 0);
5561-
if (path->grh_mlid & (1 << 7)) {
5561+
5562+
if (path->grh_mlid & (1 << 7) ||
5563+
ah_attr->type == RDMA_AH_ATTR_TYPE_ROCE) {
55625564
u32 tc_fl = be32_to_cpu(path->tclass_flowlabel);
55635565

55645566
rdma_ah_set_grh(ah_attr, NULL,

0 commit comments

Comments
 (0)