From patchwork Thu May 30 17:55:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 2638501 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3411040077 for ; Thu, 30 May 2013 17:55:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935584Ab3E3Rzv (ORCPT ); Thu, 30 May 2013 13:55:51 -0400 Received: from mga02.intel.com ([134.134.136.20]:22255 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935570Ab3E3Rzv (ORCPT ); Thu, 30 May 2013 13:55:51 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 30 May 2013 10:55:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,772,1363158000"; d="scan'208";a="322054166" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by orsmga001.jf.intel.com with ESMTP; 30 May 2013 10:55:41 -0700 Received: from orsmsx101.amr.corp.intel.com ([169.254.8.64]) by ORSMSX104.amr.corp.intel.com ([169.254.3.91]) with mapi id 14.03.0123.003; Thu, 30 May 2013 10:55:41 -0700 From: "Davis, Arlin R" To: "linux-rdma@vger.kernel.org" , "ofw@lists.openfabrics.org" Subject: [PATCH 3/3] uDAPL common: add support for ia name during dat_ia_query Thread-Topic: [PATCH 3/3] uDAPL common: add support for ia name during dat_ia_query Thread-Index: Ac5cysHcw5HF8ua0RxaCy8p5sYh+jw== Date: Thu, 30 May 2013 17:55:41 +0000 Message-ID: <54347E5A035A054EAE9D05927FB467F972D53204@ORSMSX101.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org the device name was not being updated during a query. Copy the hca name into ia_attr->adapter_name for consumers. Signed-off-by: Arlin Davis --- dapl/openib_common/util.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) -- 1.7.3 diff --git a/dapl/openib_common/util.c b/dapl/openib_common/util.c index 33629b8..8b97263 100644 --- a/dapl/openib_common/util.c +++ b/dapl/openib_common/util.c @@ -310,6 +310,9 @@ DAT_RETURN dapls_ib_query_hca(IN DAPL_HCA * hca_ptr, if (ia_attr != NULL) { (void)dapl_os_memzero(ia_attr, sizeof(*ia_attr)); + strncpy(ia_attr->adapter_name, + ibv_get_device_name(hca_ptr->ib_trans.ib_dev), + DAT_NAME_MAX_LENGTH - 1); ia_attr->adapter_name[DAT_NAME_MAX_LENGTH - 1] = '\0'; ia_attr->vendor_name[DAT_NAME_MAX_LENGTH - 1] = '\0'; ia_attr->ia_address_ptr = @@ -317,7 +320,7 @@ DAT_RETURN dapls_ib_query_hca(IN DAPL_HCA * hca_ptr, dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " query_hca: %s %s \n", - ibv_get_device_name(hca_ptr->ib_trans.ib_dev), + ia_attr->adapter_name, inet_ntoa(((struct sockaddr_in *) &hca_ptr->hca_address)->sin_addr));