From: Jason Gunthorpe <jgg@ziepe.ca>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
Aharon Landau <aharonl@mellanox.com>,
Dasaratharaman Chandramouli
<dasaratharaman.chandramouli@intel.com>,
Don Hiatt <don.hiatt@intel.com>,
linux-rdma@vger.kernel.org, Maor Gottlieb <maorg@mellanox.com>,
Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>,
Sean Hefty <sean.hefty@intel.com>
Subject: Re: [PATCH rdma-rc] RDMA/mlx5: Set GRH fields in query QP on RoCE
Date: Wed, 22 Apr 2020 15:44:45 -0300 [thread overview]
Message-ID: <20200422184445.GA12730@ziepe.ca> (raw)
In-Reply-To: <20200413132028.930109-1-leon@kernel.org>
On Mon, Apr 13, 2020 at 04:20:28PM +0300, Leon Romanovsky wrote:
> From: Aharon Landau <aharonl@mellanox.com>
>
> GRH fields such as sgid_index, hop limit and etc. 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.
>
> Fixes: d8966fcd4c25 ("IB/core: Use rdma_ah_attr accessor functions")
> Signed-off-by: Aharon Landau <aharonl@mellanox.com>
> Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
> drivers/infiniband/hw/mlx5/qp.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
> index 1456db4b6295..a4f8e7c7ed24 100644
> --- a/drivers/infiniband/hw/mlx5/qp.c
> +++ b/drivers/infiniband/hw/mlx5/qp.c
> @@ -5558,13 +5558,13 @@ 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,
> - tc_fl & 0xfffff,
> - path->mgid_index,
> - path->hop_limit,
> + rdma_ah_set_grh(ah_attr, NULL, tc_fl & 0xfffff,
> + path->mgid_index, path->hop_limit,
Why is whitespace reformatting in a -rc patch? I dropped this.
Applied to for-rc
Jason
next prev parent reply other threads:[~2020-04-22 18:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 13:20 [PATCH rdma-rc] RDMA/mlx5: Set GRH fields in query QP on RoCE Leon Romanovsky
2020-04-22 18:44 ` Jason Gunthorpe [this message]
2020-04-23 5:07 ` Leon Romanovsky
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=20200422184445.GA12730@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=aharonl@mellanox.com \
--cc=dasaratharaman.chandramouli@intel.com \
--cc=dledford@redhat.com \
--cc=don.hiatt@intel.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@mellanox.com \
--cc=niranjana.vishwanathapura@intel.com \
--cc=sean.hefty@intel.com \
/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).