1
1

btl openib: if ibv_open_device() returns NULL, it's not supported

When a libibverbs driver returns NULL for its context, it's the Open
MPI libibverbs fake driver.  Hence, this device is simply not
supported -- ignore it.
Этот коммит содержится в:
Jeff Squyres 2015-04-25 05:49:32 -07:00
родитель a2b55e12f2
Коммит 76222f462e

Просмотреть файл

@ -1581,7 +1581,7 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev)
/* Open up the device */
dev_context = ibv_open_device(ib_dev);
if (NULL == dev_context) {
return OPAL_ERR_OUT_OF_RESOURCE;
return OPAL_ERR_NOT_SUPPORTED;
}
/* Find out if this device supports RC QPs */
@ -2744,10 +2744,12 @@ btl_openib_component_init(int *num_btl_modules,
found = true;
ret = init_one_device(&btl_list, dev_sorted[i].ib_dev);
if (OPAL_SUCCESS != ret && OPAL_ERR_NOT_SUPPORTED != ret) {
if (OPAL_ERR_NOT_SUPPORTED == ret) {
++num_devices_intentionally_ignored;
continue;
} else if (OPAL_SUCCESS != ret) {
free(dev_sorted);
goto no_btls;
}
}
free(dev_sorted);