Modify to comply with the "prefix rule" and remove "static inline" for
the non-rdmacm enabled case. This should fix Ticket #1294. This commit was SVN r18468.
Этот коммит содержится в:
родитель
64f61ebd07
Коммит
b9c25efbd2
@ -473,7 +473,7 @@ static int init_one_port(opal_list_t *btl_list, mca_btl_openib_hca_t *hca,
|
||||
that member, then we're < OFED v1.2, and it can only be IB. */
|
||||
#if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE)
|
||||
if (IBV_TRANSPORT_IWARP == hca->ib_dev->transport_type) {
|
||||
subnet_id = get_iwarp_subnet_id(hca->ib_dev);
|
||||
subnet_id = mca_btl_openib_get_iwarp_subnet_id(hca->ib_dev);
|
||||
} else {
|
||||
ibv_query_gid(hca->ib_dev_context, port_num, 0, &gid);
|
||||
subnet_id = ntoh64(gid.global.subnet_prefix);
|
||||
|
@ -30,7 +30,7 @@ static OBJ_CLASS_INSTANCE(rdma_addr_list_t, opal_list_item_t,
|
||||
NULL, NULL);
|
||||
static opal_list_t myaddrs;
|
||||
|
||||
uint64_t get_iwarp_subnet_id(struct ibv_device *ib_dev)
|
||||
uint64_t mca_btl_openib_get_iwarp_subnet_id(struct ibv_device *ib_dev)
|
||||
{
|
||||
opal_list_item_t *item;
|
||||
|
||||
@ -46,7 +46,7 @@ uint64_t get_iwarp_subnet_id(struct ibv_device *ib_dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t rdma_get_ipv4addr(struct ibv_context *verbs, uint8_t port)
|
||||
uint32_t mca_btl_openib_rdma_get_ipv4addr(struct ibv_context *verbs, uint8_t port)
|
||||
{
|
||||
opal_list_item_t *item;
|
||||
|
||||
@ -158,7 +158,7 @@ out1:
|
||||
return rc;
|
||||
}
|
||||
|
||||
int build_rdma_addr_list(void)
|
||||
int mca_btl_openib_build_rdma_addr_list(void)
|
||||
{
|
||||
int rc, i;
|
||||
|
||||
@ -181,7 +181,7 @@ int build_rdma_addr_list(void)
|
||||
return rc;
|
||||
}
|
||||
|
||||
void free_rdma_addr_list(void)
|
||||
void mca_btl_openib_free_rdma_addr_list(void)
|
||||
{
|
||||
opal_list_item_t *item;
|
||||
|
||||
@ -194,8 +194,8 @@ void free_rdma_addr_list(void)
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline uint64_t get_iwarp_subnet_id(struct ibv_device *ib_dev) {return 0;}
|
||||
static inline uint32_t rdma_get_ipv4addr(struct ibv_context *verbs, uint8_t port) {return 0;}
|
||||
static inline int build_rdma_addr_list(void) {return 0;}
|
||||
static inline void free_rdma_addr_list(void) {}
|
||||
uint64_t mca_btl_openib_get_iwarp_subnet_id(struct ibv_device *ib_dev) {return 0;}
|
||||
uint32_t mca_btl_openib_rdma_get_ipv4addr(struct ibv_context *verbs, uint8_t port) {return 0;}
|
||||
int mca_btl_openib_build_rdma_addr_list(void) {return 0;}
|
||||
void mca_btl_openib_free_rdma_addr_list(void) {}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
extern uint64_t get_iwarp_subnet_id(struct ibv_device *ib_dev);
|
||||
extern uint32_t rdma_get_ipv4addr(struct ibv_context *verbs, uint8_t port);
|
||||
extern int build_rdma_addr_list(void);
|
||||
extern void free_rdma_addr_list(void);
|
||||
extern uint64_t mca_btl_openib_get_iwarp_subnet_id(struct ibv_device *ib_dev);
|
||||
extern uint32_t mca_btl_openib_rdma_get_ipv4addr(struct ibv_context *verbs, uint8_t port);
|
||||
extern int mca_btl_openib_build_rdma_addr_list(void);
|
||||
extern void mca_btl_openib_free_rdma_addr_list(void);
|
||||
|
@ -959,7 +959,7 @@ static int ipaddrcheck(struct rdmacm_contents *server, mca_btl_openib_module_t *
|
||||
|
||||
for (i = 0; i < attr.phys_port_cnt; i++) {
|
||||
bool found = false;
|
||||
uint32_t ipaddr = rdma_get_ipv4addr(openib_btl->hca->ib_dev_context, i+1);
|
||||
uint32_t ipaddr = mca_btl_openib_rdma_get_ipv4addr(openib_btl->hca->ib_dev_context, i+1);
|
||||
opal_list_item_t *item;
|
||||
|
||||
for (item = opal_list_get_first(&server_list); item != opal_list_get_end(&server_list); item = opal_list_get_next(item)) {
|
||||
@ -1202,7 +1202,7 @@ static int rdmacm_component_destroy(void)
|
||||
BTL_ERROR(("Error disabling fd monitor"));
|
||||
}
|
||||
|
||||
free_rdma_addr_list();
|
||||
mca_btl_openib_free_rdma_addr_list();
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -1214,7 +1214,7 @@ static int rdmacm_component_init(void)
|
||||
OBJ_CONSTRUCT(&server_list, opal_list_t);
|
||||
OBJ_CONSTRUCT(&client_list, opal_list_t);
|
||||
|
||||
rc = build_rdma_addr_list();
|
||||
rc = mca_btl_openib_build_rdma_addr_list();
|
||||
if (-1 == rc) {
|
||||
orte_output_verbose(5, mca_btl_base_output,
|
||||
"openib BTL: rdmacm CPC unable to find any valid IP address");
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user