1
1

usnic: update to match new libfabric

Этот коммит содержится в:
Jeff Squyres 2015-02-03 10:23:44 -08:00
родитель d2490d2fd8
Коммит bfa54d5d7b
6 изменённых файлов: 28 добавлений и 28 удалений

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

@ -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
(to ensure that each MPI process will be able to get the
number of CQs that it needs) */
if (uip->ui_num_vf < 0 ||
uip->ui_qp_per_vf < 0 ||
uip->ui_cq_per_vf < 0) {
if (uip->ui.v1.ui_num_vf < 0 ||
uip->ui.v1.ui_qp_per_vf < 0 ||
uip->ui.v1.ui_cq_per_vf < 0) {
snprintf(str, sizeof(str), "Cannot read usNIC resources");
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)",
uip->ui_num_vf, unlp);
uip->ui.v1.ui_num_vf, unlp);
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) {
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);
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) {
snprintf(str, sizeof(str),
"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);
goto error;
}
@ -550,12 +550,12 @@ static bool filter_module(opal_btl_usnic_module_t *module,
info = module->fabric_info;
uip = &module->usnic_info;
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;
for (i = 0; i < filter->n_elt; ++i) {
if (filter->elts[i].is_netmask) {
/* 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) {
match = true;
break;
@ -800,12 +800,12 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules,
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",
info->fabric_attr->name,
(unsigned int) module->usnic_info.ui_link_speed,
(unsigned int) module->usnic_info.ui_netmask_be,
module->usnic_info.ui_ifname,
module->usnic_info.ui_num_vf,
module->usnic_info.ui_qp_per_vf,
module->usnic_info.ui_cq_per_vf);
(unsigned int) module->usnic_info.ui.v1.ui_link_speed,
(unsigned int) module->usnic_info.ui.v1.ui_netmask_be,
module->usnic_info.ui.v1.ui_ifname,
module->usnic_info.ui.v1.ui_num_vf,
module->usnic_info.ui.v1.ui_qp_per_vf,
module->usnic_info.ui.v1.ui_cq_per_vf);
/* respect if_include/if_exclude subnets/ifaces from the user */
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$
*
* Additional copyrights may follow
@ -153,7 +153,7 @@ static hwloc_obj_t find_device_numa(opal_btl_usnic_module_t *module)
obj = NULL;
while (NULL != (obj = hwloc_get_next_osdev(opal_hwloc_topology, obj))) {
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;
}
}

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

@ -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$
*
@ -68,7 +68,7 @@ static void map_output_modules(FILE *fp)
for (i = 0; i < mca_btl_usnic_component.num_modules; ++i) {
uip = &modules[i]->usnic_info;
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,
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;
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->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,
sizeof(module->if_ipv4_addr_str),

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

@ -11,7 +11,7 @@
* All rights reserved.
* Copyright (c) 2006 Sandia National Laboratories. All rights
* reserved.
* Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011-2015 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -36,7 +36,7 @@
#include "btl_usnic_util.h"
/* In libfabric prov/usnic/src */
#include "fi_usnic.h"
#include "fi_ext_usnic.h"
/*
* Default limits.

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

@ -11,7 +11,7 @@
* All rights reserved.
* Copyright (c) 2006 Sandia National Laboratories. All rights
* 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$
*
@ -304,12 +304,12 @@ static uint64_t compute_weight(
/* Just compare the CIDR-masked IP address to see if they're on
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;
opal_output_verbose(5, USNIC_OUT,
"btl:usnic:%s: checking my IP address/subnet (%s/%d) vs. peer (%s/%d): %s",
__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,
usnic_netmask_to_cidrlen(proc_modex_addr->netmask),
(mynet == peernet ? "match" : "DO NOT match"));