[ofw] [PATCH 3/3] uDAPL common: add support for ia name during dat_ia_query
Davis, Arlin R
arlin.r.davis at intel.com
Thu May 30 10:55:41 PDT 2013
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 at intel.com>
---
dapl/openib_common/util.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
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));
--
1.7.3
More information about the ofw
mailing list