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