RDMA/mlx5: Set GRH fields in query QP on RoCE
authorAharon Landau <aharonl@mellanox.com>
Mon, 13 Apr 2020 13:20:28 +0000 (16:20 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 22 Apr 2020 18:43:46 +0000 (15:43 -0300)
commit2d7e3ff7b6f2c614eb21d0dc348957a47eaffb57
tree23e179d36b4f4aacb35b2d890e8714806e4f93bc
parent6e051971b0e2eeb0ce7ec65d3cc8180450512d36
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: 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>
drivers/infiniband/hw/mlx5/qp.c