From: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH 4/7] ibacm: Set SM LID address in network byte order
Date: Fri, 4 Mar 2011 16:02:35 -0800 [thread overview]
Message-ID: <CF9C39F99A89134C9CF9C4CCB68B8DDF25CC92EAC2@orsmsx501.amr.corp.intel.com> (raw)
acm_set_dest_addr expects LIDs to be in network order.
Convert the sm_lid retrieved from the port attributes into
network order. This formats the LID value correctly
when entered into the ibacm log.
Signed-off-by: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
src/acm.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/acm.c b/src/acm.c
index 10680f8..d52e83a 100644
--- a/src/acm.c
+++ b/src/acm.c
@@ -2637,13 +2637,14 @@ static void acm_port_up(struct acm_port *port)
port->lid = attr.lid;
port->lid_mask = 0xffff - ((1 << attr.lmc) - 1);
- acm_set_dest_addr(&port->sa_dest, ACM_ADDRESS_LID,
- (uint8_t *) &attr.sm_lid, sizeof(attr.sm_lid));
port->sa_dest.av.src_path_bits = 0;
port->sa_dest.av.dlid = attr.sm_lid;
port->sa_dest.av.sl = attr.sm_sl;
port->sa_dest.av.port_num = port->port_num;
port->sa_dest.remote_qpn = 1;
+ attr.sm_lid = htons(attr.sm_lid);
+ acm_set_dest_addr(&port->sa_dest, ACM_ADDRESS_LID,
+ (uint8_t *) &attr.sm_lid, sizeof(attr.sm_lid));
port->sa_dest.ah = ibv_create_ah(port->dev->pd, &port->sa_dest.av);
if (!port->sa_dest.ah)
--
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
reply other threads:[~2011-03-05 0:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CF9C39F99A89134C9CF9C4CCB68B8DDF25CC92EAC2@orsmsx501.amr.corp.intel.com \
--to=sean.hefty-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.