From patchwork Sat Mar 5 00:02:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hefty, Sean" X-Patchwork-Id: 610491 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p25024lU024745 for ; Sat, 5 Mar 2011 00:03:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760081Ab1CEAC6 (ORCPT ); Fri, 4 Mar 2011 19:02:58 -0500 Received: from mga09.intel.com ([134.134.136.24]:51776 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760032Ab1CEAC6 convert rfc822-to-8bit (ORCPT ); Fri, 4 Mar 2011 19:02:58 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 04 Mar 2011 16:02:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.62,267,1297065600"; d="scan'208";a="609268267" Received: from orsmsx603.amr.corp.intel.com ([10.22.226.49]) by orsmga002.jf.intel.com with ESMTP; 04 Mar 2011 16:02:36 -0800 Received: from orsmsx605.amr.corp.intel.com (10.22.226.10) by orsmsx603.amr.corp.intel.com (10.22.226.49) with Microsoft SMTP Server (TLS) id 8.2.254.0; Fri, 4 Mar 2011 16:02:35 -0800 Received: from orsmsx501.amr.corp.intel.com ([10.22.226.209]) by orsmsx605.amr.corp.intel.com ([10.22.226.10]) with mapi; Fri, 4 Mar 2011 16:02:35 -0800 From: "Hefty, Sean" To: linux-rdma Date: Fri, 4 Mar 2011 16:02:35 -0800 Subject: [PATCH 4/7] ibacm: Set SM LID address in network byte order Thread-Topic: [PATCH 4/7] ibacm: Set SM LID address in network byte order Thread-Index: AcvaxgSfoktHPkOORD6XfWr1lHcX3gAANbFA Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 05 Mar 2011 00:03:00 +0000 (UTC) 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)