1
1

usnic: minor update of member field names

Этот коммит содержится в:
Jeff Squyres 2015-02-06 14:38:24 -08:00 коммит произвёл Nathan Hjelm
родитель 8311428602
Коммит af61065b87
2 изменённых файлов: 11 добавлений и 12 удалений

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

@ -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$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -87,7 +87,7 @@ usnic_seg_type_str(opal_btl_usnic_seg_type_t t)
typedef struct opal_btl_usnic_reg_t { typedef struct opal_btl_usnic_reg_t {
mca_mpool_base_registration_t base; mca_mpool_base_registration_t base;
struct fid_mr *mr; struct fid_mr *ur_mr;
} opal_btl_usnic_reg_t; } opal_btl_usnic_reg_t;

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

@ -1698,13 +1698,13 @@ static int usnic_sendi(struct mca_btl_base_module_t* btl,
* RDMA Memory Pool (de)register callbacks * RDMA Memory Pool (de)register callbacks
*/ */
static int usnic_reg_mr(void* reg_data, void* base, size_t size, static int usnic_reg_mr(void* reg_data, void* base, size_t size,
mca_mpool_base_registration_t* reg) mca_mpool_base_registration_t* reg)
{ {
opal_btl_usnic_module_t* mod = (opal_btl_usnic_module_t*)reg_data; opal_btl_usnic_module_t* mod = (opal_btl_usnic_module_t*)reg_data;
opal_btl_usnic_reg_t* ud_reg = (opal_btl_usnic_reg_t*)reg; opal_btl_usnic_reg_t* ur = (opal_btl_usnic_reg_t*)reg;
int rc; int rc;
rc = fi_mr_reg(mod->domain, base, size, 0, 0, 0, 0, &ud_reg->mr, NULL); rc = fi_mr_reg(mod->domain, base, size, 0, 0, 0, 0, &ur->ur_mr, NULL);
if (0 != rc) { if (0 != rc) {
return OPAL_ERR_OUT_OF_RESOURCE; return OPAL_ERR_OUT_OF_RESOURCE;
} }
@ -1712,21 +1712,20 @@ static int usnic_reg_mr(void* reg_data, void* base, size_t size,
return OPAL_SUCCESS; return OPAL_SUCCESS;
} }
static int usnic_dereg_mr(void* reg_data, static int usnic_dereg_mr(void* reg_data,
mca_mpool_base_registration_t* reg) mca_mpool_base_registration_t* reg)
{ {
opal_btl_usnic_reg_t* ud_reg = (opal_btl_usnic_reg_t*)reg; opal_btl_usnic_reg_t* ur = (opal_btl_usnic_reg_t*)reg;
if (ud_reg->mr != NULL) { if (ur->ur_mr != NULL) {
if (0 != fi_close(&ud_reg->mr->fid)) { if (0 != fi_close(&ur->ur_mr->fid)) {
opal_output(0, "%s: error unpinning USD memory mr=%p: %s\n", opal_output(0, "%s: error unpinning USD memory mr=%p: %s\n",
__func__, (void*) ud_reg->mr, strerror(errno)); __func__, (void*) ur->ur_mr, strerror(errno));
return OPAL_ERROR; return OPAL_ERROR;
} }
} }
ud_reg->mr = NULL; ur->ur_mr = NULL;
return OPAL_SUCCESS; return OPAL_SUCCESS;
} }