usnic: update to match new libfabric
Этот коммит содержится в:
родитель
d2490d2fd8
Коммит
bfa54d5d7b
@ -343,31 +343,31 @@ static int check_usnic_config(opal_btl_usnic_module_t *module,
|
|||||||
3. num_vfs * num_cqs_per_vf >= num_local_procs * NUM_CHANNELS
|
3. num_vfs * num_cqs_per_vf >= num_local_procs * NUM_CHANNELS
|
||||||
(to ensure that each MPI process will be able to get the
|
(to ensure that each MPI process will be able to get the
|
||||||
number of CQs that it needs) */
|
number of CQs that it needs) */
|
||||||
if (uip->ui_num_vf < 0 ||
|
if (uip->ui.v1.ui_num_vf < 0 ||
|
||||||
uip->ui_qp_per_vf < 0 ||
|
uip->ui.v1.ui_qp_per_vf < 0 ||
|
||||||
uip->ui_cq_per_vf < 0) {
|
uip->ui.v1.ui_cq_per_vf < 0) {
|
||||||
snprintf(str, sizeof(str), "Cannot read usNIC resources");
|
snprintf(str, sizeof(str), "Cannot read usNIC resources");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uip->ui_num_vf < unlp) {
|
if (uip->ui.v1.ui_num_vf < unlp) {
|
||||||
snprintf(str, sizeof(str), "Not enough usNICs (found %d, need %d)",
|
snprintf(str, sizeof(str), "Not enough usNICs (found %d, need %d)",
|
||||||
uip->ui_num_vf, unlp);
|
uip->ui.v1.ui_num_vf, unlp);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uip->ui_num_vf * uip->ui_qp_per_vf <
|
if (uip->ui.v1.ui_num_vf * uip->ui.v1.ui_qp_per_vf <
|
||||||
unlp * USNIC_NUM_CHANNELS) {
|
unlp * USNIC_NUM_CHANNELS) {
|
||||||
snprintf(str, sizeof(str), "Not enough WQ/RQ (found %d, need %d)",
|
snprintf(str, sizeof(str), "Not enough WQ/RQ (found %d, need %d)",
|
||||||
uip->ui_num_vf * uip->ui_qp_per_vf,
|
uip->ui.v1.ui_num_vf * uip->ui.v1.ui_qp_per_vf,
|
||||||
unlp * USNIC_NUM_CHANNELS);
|
unlp * USNIC_NUM_CHANNELS);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (uip->ui_num_vf * uip->ui_cq_per_vf <
|
if (uip->ui.v1.ui_num_vf * uip->ui.v1.ui_cq_per_vf <
|
||||||
unlp * USNIC_NUM_CHANNELS) {
|
unlp * USNIC_NUM_CHANNELS) {
|
||||||
snprintf(str, sizeof(str),
|
snprintf(str, sizeof(str),
|
||||||
"Not enough CQ per usNIC (found %d, need %d)",
|
"Not enough CQ per usNIC (found %d, need %d)",
|
||||||
uip->ui_num_vf * uip->ui_cq_per_vf,
|
uip->ui.v1.ui_num_vf * uip->ui.v1.ui_cq_per_vf,
|
||||||
unlp * USNIC_NUM_CHANNELS);
|
unlp * USNIC_NUM_CHANNELS);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@ -550,12 +550,12 @@ static bool filter_module(opal_btl_usnic_module_t *module,
|
|||||||
info = module->fabric_info;
|
info = module->fabric_info;
|
||||||
uip = &module->usnic_info;
|
uip = &module->usnic_info;
|
||||||
src = info->src_addr;
|
src = info->src_addr;
|
||||||
module_mask = src->sin_addr.s_addr & uip->ui_netmask_be;
|
module_mask = src->sin_addr.s_addr & uip->ui.v1.ui_netmask_be;
|
||||||
match = false;
|
match = false;
|
||||||
for (i = 0; i < filter->n_elt; ++i) {
|
for (i = 0; i < filter->n_elt; ++i) {
|
||||||
if (filter->elts[i].is_netmask) {
|
if (filter->elts[i].is_netmask) {
|
||||||
/* conservative: we also require the netmask to match */
|
/* conservative: we also require the netmask to match */
|
||||||
if (filter->elts[i].netmask_be == uip->ui_netmask_be &&
|
if (filter->elts[i].netmask_be == uip->ui.v1.ui_netmask_be &&
|
||||||
filter->elts[i].addr_be == module_mask) {
|
filter->elts[i].addr_be == module_mask) {
|
||||||
match = true;
|
match = true;
|
||||||
break;
|
break;
|
||||||
@ -800,12 +800,12 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules,
|
|||||||
opal_output_verbose(5, USNIC_OUT,
|
opal_output_verbose(5, USNIC_OUT,
|
||||||
"btl:usnic: device %s usnic_info: link speed=%d, netmask=0x%x, ifname=%s, num_vf=%d, qp/vf=%d, cq/vf=%d",
|
"btl:usnic: device %s usnic_info: link speed=%d, netmask=0x%x, ifname=%s, num_vf=%d, qp/vf=%d, cq/vf=%d",
|
||||||
info->fabric_attr->name,
|
info->fabric_attr->name,
|
||||||
(unsigned int) module->usnic_info.ui_link_speed,
|
(unsigned int) module->usnic_info.ui.v1.ui_link_speed,
|
||||||
(unsigned int) module->usnic_info.ui_netmask_be,
|
(unsigned int) module->usnic_info.ui.v1.ui_netmask_be,
|
||||||
module->usnic_info.ui_ifname,
|
module->usnic_info.ui.v1.ui_ifname,
|
||||||
module->usnic_info.ui_num_vf,
|
module->usnic_info.ui.v1.ui_num_vf,
|
||||||
module->usnic_info.ui_qp_per_vf,
|
module->usnic_info.ui.v1.ui_qp_per_vf,
|
||||||
module->usnic_info.ui_cq_per_vf);
|
module->usnic_info.ui.v1.ui_cq_per_vf);
|
||||||
|
|
||||||
/* respect if_include/if_exclude subnets/ifaces from the user */
|
/* respect if_include/if_exclude subnets/ifaces from the user */
|
||||||
if (filter != NULL) {
|
if (filter != NULL) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2013-2015 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -153,7 +153,7 @@ static hwloc_obj_t find_device_numa(opal_btl_usnic_module_t *module)
|
|||||||
obj = NULL;
|
obj = NULL;
|
||||||
while (NULL != (obj = hwloc_get_next_osdev(opal_hwloc_topology, obj))) {
|
while (NULL != (obj = hwloc_get_next_osdev(opal_hwloc_topology, obj))) {
|
||||||
assert(HWLOC_OBJ_OS_DEVICE == obj->type);
|
assert(HWLOC_OBJ_OS_DEVICE == obj->type);
|
||||||
if (0 == strcmp(obj->name, uip->ui_ifname)) {
|
if (0 == strcmp(obj->name, uip->ui.v1.ui_ifname)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2013-2015 Cisco Systems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2014 Intel, Inc. All rights reserved
|
* Copyright (c) 2014 Intel, Inc. All rights reserved
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
@ -68,7 +68,7 @@ static void map_output_modules(FILE *fp)
|
|||||||
for (i = 0; i < mca_btl_usnic_component.num_modules; ++i) {
|
for (i = 0; i < mca_btl_usnic_component.num_modules; ++i) {
|
||||||
uip = &modules[i]->usnic_info;
|
uip = &modules[i]->usnic_info;
|
||||||
sin = modules[i]->fabric_info->src_addr;
|
sin = modules[i]->fabric_info->src_addr;
|
||||||
prefix_len = usnic_netmask_to_cidrlen(uip->ui_netmask_be);
|
prefix_len = usnic_netmask_to_cidrlen(uip->ui.v1.ui_netmask_be);
|
||||||
|
|
||||||
opal_btl_usnic_snprintf_ipv4_addr(ipv4, IPV4STRADDRLEN,
|
opal_btl_usnic_snprintf_ipv4_addr(ipv4, IPV4STRADDRLEN,
|
||||||
sin->sin_addr.s_addr,
|
sin->sin_addr.s_addr,
|
||||||
|
@ -2117,9 +2117,9 @@ static void init_local_modex_part1(opal_btl_usnic_module_t *module)
|
|||||||
|
|
||||||
sin = info->src_addr;
|
sin = info->src_addr;
|
||||||
modex->ipv4_addr = sin->sin_addr.s_addr;
|
modex->ipv4_addr = sin->sin_addr.s_addr;
|
||||||
modex->netmask = uip->ui_netmask_be;
|
modex->netmask = uip->ui.v1.ui_netmask_be;
|
||||||
modex->max_msg_size = info->ep_attr->max_msg_size;
|
modex->max_msg_size = info->ep_attr->max_msg_size;
|
||||||
modex->link_speed_mbps = uip->ui_link_speed;
|
modex->link_speed_mbps = uip->ui.v1.ui_link_speed;
|
||||||
|
|
||||||
opal_btl_usnic_snprintf_ipv4_addr(module->if_ipv4_addr_str,
|
opal_btl_usnic_snprintf_ipv4_addr(module->if_ipv4_addr_str,
|
||||||
sizeof(module->if_ipv4_addr_str),
|
sizeof(module->if_ipv4_addr_str),
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2011-2015 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -36,7 +36,7 @@
|
|||||||
#include "btl_usnic_util.h"
|
#include "btl_usnic_util.h"
|
||||||
|
|
||||||
/* In libfabric prov/usnic/src */
|
/* In libfabric prov/usnic/src */
|
||||||
#include "fi_usnic.h"
|
#include "fi_ext_usnic.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default limits.
|
* Default limits.
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2013-2015 Cisco Systems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
|
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
@ -304,12 +304,12 @@ static uint64_t compute_weight(
|
|||||||
|
|
||||||
/* Just compare the CIDR-masked IP address to see if they're on
|
/* Just compare the CIDR-masked IP address to see if they're on
|
||||||
the same network. If so, we're good. */
|
the same network. If so, we're good. */
|
||||||
mynet = sinp->sin_addr.s_addr & uip->ui_netmask_be;
|
mynet = sinp->sin_addr.s_addr & uip->ui.v1.ui_netmask_be;
|
||||||
peernet = proc_modex_addr->ipv4_addr & proc_modex_addr->netmask;
|
peernet = proc_modex_addr->ipv4_addr & proc_modex_addr->netmask;
|
||||||
opal_output_verbose(5, USNIC_OUT,
|
opal_output_verbose(5, USNIC_OUT,
|
||||||
"btl:usnic:%s: checking my IP address/subnet (%s/%d) vs. peer (%s/%d): %s",
|
"btl:usnic:%s: checking my IP address/subnet (%s/%d) vs. peer (%s/%d): %s",
|
||||||
__func__, my_ip_string,
|
__func__, my_ip_string,
|
||||||
usnic_netmask_to_cidrlen(uip->ui_netmask_be),
|
usnic_netmask_to_cidrlen(uip->ui.v1.ui_netmask_be),
|
||||||
peer_ip_string,
|
peer_ip_string,
|
||||||
usnic_netmask_to_cidrlen(proc_modex_addr->netmask),
|
usnic_netmask_to_cidrlen(proc_modex_addr->netmask),
|
||||||
(mynet == peernet ? "match" : "DO NOT match"));
|
(mynet == peernet ? "match" : "DO NOT match"));
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user