From patchwork Mon Jul 19 19:04:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 112768 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6JJ4I7g006976 for ; Mon, 19 Jul 2010 19:04:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965454Ab0GSTER (ORCPT ); Mon, 19 Jul 2010 15:04:17 -0400 Received: from mga09.intel.com ([134.134.136.24]:23413 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965355Ab0GSTEQ convert rfc822-to-8bit (ORCPT ); Mon, 19 Jul 2010 15:04:16 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 19 Jul 2010 12:03:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.55,228,1278313200"; d="scan'208";a="536940239" Received: from orsmsx602.amr.corp.intel.com ([10.22.226.211]) by orsmga002.jf.intel.com with ESMTP; 19 Jul 2010 12:04:42 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.226.10) by orsmsx602.amr.corp.intel.com (10.22.226.211) with Microsoft SMTP Server (TLS) id 8.2.254.0; Mon, 19 Jul 2010 12:04:15 -0700 Received: from orsmsx506.amr.corp.intel.com ([10.22.226.44]) by orsmsx605.amr.corp.intel.com ([10.22.226.10]) with mapi; Mon, 19 Jul 2010 12:04:14 -0700 From: "Davis, Arlin R" To: Itay Berman CC: linux-rdma , Or Gerlitz Date: Mon, 19 Jul 2010 12:04:13 -0700 Subject: RE: some dapl assistance - [PATCH] dapl-2.0 improperly handles pkey check/query in host order Thread-Topic: some dapl assistance - [PATCH] dapl-2.0 improperly handles pkey check/query in host order Thread-Index: AcsigEblkSbOwrGnQOOL3Ex0msw2CQAJT+bgAGCqnIAAAyw3IAADJn/gAAKyP/AAgpD0wABG7tXA Message-ID: References: <4C344493.2030600@Voltaire.com><4C3C50CC.7000508@Voltaire.com><6D1AA8ED7402FF49AFAB26F0C948ACF5014B9894@exil.voltaire.com><6D1AA8ED7402FF49AFAB26F0C948ACF5014B98F3@exil.voltaire.com> <6D1AA8ED7402FF49AFAB26F0C948ACF5014B9BD0@exil.voltaire.com> In-Reply-To: <6D1AA8ED7402FF49AFAB26F0C948ACF5014B9BD0@exil.voltaire.com> 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.3 (demeter.kernel.org [140.211.167.41]); Mon, 19 Jul 2010 19:04:18 +0000 (UTC) diff --git a/dapl/openib_common/util.c b/dapl/openib_common/util.c index a69261f..73730ef 100644 --- a/dapl/openib_common/util.c +++ b/dapl/openib_common/util.c @@ -326,7 +326,7 @@ DAT_RETURN dapls_ib_query_hca(IN DAPL_HCA * hca_ptr, /* set SL, PKEY values, defaults = 0 */ hca_ptr->ib_trans.pkey_idx = 0; - hca_ptr->ib_trans.pkey = dapl_os_get_env_val("DAPL_IB_PKEY", 0); + hca_ptr->ib_trans.pkey = htons(dapl_os_get_env_val("DAPL_IB_PKEY", 0)); hca_ptr->ib_trans.sl = dapl_os_get_env_val("DAPL_IB_SL", 0); /* index provided, get pkey; pkey provided, get index */ @@ -345,10 +345,10 @@ DAT_RETURN dapls_ib_query_hca(IN DAPL_HCA * hca_ptr, } } if (i == dev_attr.max_pkeys) { - dapl_log(DAPL_DBG_TYPE_WARN, - " Warning: new pkey(%d), query (%s)" - " err or key !found, using defaults\n", - hca_ptr->ib_trans.pkey, strerror(errno)); + dapl_log(DAPL_DBG_TYPE_ERR, + " ERR: new pkey(0x%x), query (%s)" + " err or key !found, using default pkey_idx=0\n", + ntohs(hca_ptr->ib_trans.pkey), strerror(errno)); } } skip_ib: