From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH rdma-next 1/3] IB/CM: Add OPA Path record support to CM
Date: Mon, 5 Jun 2017 13:33:57 -0600 [thread overview]
Message-ID: <20170605193357.GA21236@obsidianresearch.com> (raw)
In-Reply-To: <1496686803-51338-2-git-send-email-don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
On Mon, Jun 05, 2017 at 02:20:01PM -0400, Don Hiatt wrote:
> Add OPA path record support to the Connection Manager.
>
> Reviewed-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> drivers/infiniband/core/cm.c | 50 +++++++++++++++++++++++++++++++++++++-------
> include/rdma/opa_addr.h | 18 ++++++++++++++++
> 2 files changed, 60 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
> index 8525d65..f8602e0 100644
> +++ b/drivers/infiniband/core/cm.c
> @@ -1175,6 +1175,11 @@ static void cm_format_req(struct cm_req_msg *req_msg,
> {
> struct sa_path_rec *pri_path = param->primary_path;
> struct sa_path_rec *alt_path = param->alternate_path;
> + bool pri_ext = false;
> +
> + if (pri_path->rec_type == SA_PATH_REC_TYPE_OPA)
> + pri_ext = opa_is_extended_lid(pri_path->opa.dlid,
> + pri_path->opa.slid);
>
> cm_format_mad_hdr(&req_msg->hdr, CM_REQ_ATTR_ID,
> cm_form_tid(cm_id_priv, CM_MSG_SEQUENCE_REQ));
> @@ -1202,18 +1207,24 @@ static void cm_format_req(struct cm_req_msg *req_msg,
> cm_req_set_srq(req_msg, param->srq);
> }
>
> + req_msg->primary_local_gid = pri_path->sgid;
> + req_msg->primary_remote_gid = pri_path->dgid;
> + if (pri_ext) {
> + req_msg->primary_local_gid.global.interface_id
> + = OPA_MAKE_ID(be32_to_cpu(pri_path->opa.slid));
> + req_msg->primary_remote_gid.global.interface_id
> + =
> OPA_MAKE_ID(be32_to_cpu(pri_path->opa.dlid));
Doesn't OPA have a CM format that includes 32 bit lids?
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-06-05 19:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-05 18:20 [PATCH rdma-next 0/3] Enhance IB CM to support OPA extended LIDs Don Hiatt
[not found] ` <1496686803-51338-1-git-send-email-don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-06-05 18:20 ` [PATCH rdma-next 1/3] IB/CM: Add OPA Path record support to CM Don Hiatt
[not found] ` <1496686803-51338-2-git-send-email-don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-06-05 19:33 ` Jason Gunthorpe [this message]
[not found] ` <20170605193357.GA21236-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-06-07 17:26 ` Don Hiatt
2017-06-05 18:20 ` [PATCH rdma-next 2/3] IB/CM: Create appropriate path records when handling CM request Don Hiatt
[not found] ` <1496686803-51338-3-git-send-email-don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-06-05 20:40 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373AB140319-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-06-07 17:23 ` Don Hiatt
2017-06-05 18:20 ` [PATCH rdma-next 3/3] IB/CM: Set appropriate slid and dlid " Don Hiatt
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=20170605193357.GA21236@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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