diff mbox

[3/3] uDAPL common: add support for ia name during dat_ia_query

Message ID 54347E5A035A054EAE9D05927FB467F972D53204@ORSMSX101.amr.corp.intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Arlin Davis May 30, 2013, 5:55 p.m. UTC
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 <arlin.r.davis@intel.com>

---
 dapl/openib_common/util.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

-- 
1.7.3
diff mbox

Patch

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));