From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Doug Ledford <dledford@redhat.com>,
Mark Zhang <markz@mellanox.com>,
linux-rdma@vger.kernel.org, Maor Gottlieb <maorg@mellanox.com>
Subject: Re: [PATCH rdma-next v1 6/7] RDMA/cm: Set flow label of recv_wc based on primary flow label
Date: Sun, 29 Mar 2020 11:00:07 +0300 [thread overview]
Message-ID: <20200329080007.GC2454444@unreal> (raw)
In-Reply-To: <20200327123733.GA6821@ziepe.ca>
On Fri, Mar 27, 2020 at 09:37:33AM -0300, Jason Gunthorpe wrote:
> On Sun, Mar 22, 2020 at 11:30:30AM +0200, Leon Romanovsky wrote:
> > From: Mark Zhang <markz@mellanox.com>
> >
> > In the request handler of the response side, Set flow label of the
> > recv_wc if it is not net. It will be used for all messages sent
> > by the responder.
> >
> > Signed-off-by: Mark Zhang <markz@mellanox.com>
> > Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
> > Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> > drivers/infiniband/core/cm.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
> > index bbbfa77dbce7..4ab2f71da522 100644
> > +++ b/drivers/infiniband/core/cm.c
> > @@ -2039,6 +2039,7 @@ static int cm_req_handler(struct cm_work *work)
> > struct cm_req_msg *req_msg;
> > const struct ib_global_route *grh;
> > const struct ib_gid_attr *gid_attr;
> > + struct ib_grh *ibgrh;
> > int ret;
> >
> > req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad;
> > @@ -2048,6 +2049,12 @@ static int cm_req_handler(struct cm_work *work)
> > if (IS_ERR(cm_id_priv))
> > return PTR_ERR(cm_id_priv);
> >
> > + ibgrh = work->mad_recv_wc->recv_buf.grh;
> > + if (!(be32_to_cpu(ibgrh->version_tclass_flow) & IB_GRH_FLOWLABEL_MASK))
> > + ibgrh->version_tclass_flow |=
> > + cpu_to_be32(IBA_GET(CM_REQ_PRIMARY_FLOW_LABEL,
> > + req_msg));
>
> This doesn't seem right.
I will check, this part looks strange while reading IBTA sections
"13.5.4.3 CONSTRUCTING A RESPONSE WITHOUT A GRH" and
"13.5.4.4 CONSTRUCTING A RESPONSE WITH A GRH"
Thanks
next prev parent reply other threads:[~2020-03-30 6:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-22 9:30 [PATCH rdma-next v1 0/7] Set flow_label and RoCEv2 UDP source port for datagram QP Leon Romanovsky
2020-03-22 9:30 ` [PATCH mlx5-next v1 1/7] net/mlx5: Refactor HCA capability set flow Leon Romanovsky
2020-03-22 9:30 ` [PATCH mlx5-next v1 2/7] net/mlx5: Enable SW-defined RoCEv2 UDP source port Leon Romanovsky
2020-03-22 9:30 ` [PATCH rdma-next v1 3/7] RDMA/core: Add hash functions to calculate RoCEv2 flowlabel and " Leon Romanovsky
2020-03-22 9:30 ` [PATCH rdma-next v1 4/7] RDMA/mlx5: Define RoCEv2 udp source port when set path Leon Romanovsky
2020-03-22 9:30 ` [PATCH rdma-next v1 5/7] RDMA/cma: Initialize the flow label of CM's route path record Leon Romanovsky
2020-03-22 9:30 ` [PATCH rdma-next v1 6/7] RDMA/cm: Set flow label of recv_wc based on primary flow label Leon Romanovsky
2020-03-27 12:37 ` Jason Gunthorpe
2020-03-29 8:00 ` Leon Romanovsky [this message]
2020-03-30 6:27 ` Leon Romanovsky
2020-03-22 9:30 ` [PATCH rdma-next v1 7/7] RDMA/mlx5: Set UDP source port based on the grh.flow_label 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=20200329080007.GC2454444@unreal \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@mellanox.com \
--cc=markz@mellanox.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).