Skip to content

Commit a351abf

Browse files
authored
Merge pull request #5352 from jsquyres/pr/v2.x/fix-btl-tcp-hash-map
v2.x: btl/tcp: fix hash map usage
2 parents 08c3bf5 + 19a420a commit a351abf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

opal/mca/btl/tcp/btl_tcp_proc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static mca_btl_tcp_interface_t** mca_btl_tcp_retrieve_local_interfaces(mca_btl_t
294294
*/
295295
for( idx = opal_ifbegin(); idx >= 0; idx = opal_ifnext (idx) ) {
296296
int kindex;
297-
uint32_t index;
297+
uint64_t index;
298298
bool skip = false;
299299

300300
opal_ifindextoaddr (idx, (struct sockaddr*) &local_addr, sizeof (local_addr));
@@ -348,7 +348,7 @@ static mca_btl_tcp_interface_t** mca_btl_tcp_retrieve_local_interfaces(mca_btl_t
348348
/* create entry for this kernel index previously not seen */
349349
if (OPAL_SUCCESS != rc) {
350350
index = proc_data->num_local_interfaces++;
351-
opal_hash_table_set_value_uint32(&proc_data->local_kindex_to_index, kindex, &index);
351+
opal_hash_table_set_value_uint32(&proc_data->local_kindex_to_index, kindex, (void**) index);
352352

353353
if( proc_data->num_local_interfaces == proc_data->max_local_interfaces ) {
354354
proc_data->max_local_interfaces <<= 1;
@@ -468,7 +468,7 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
468468

469469
for( i = 0; i < btl_proc->proc_addr_count; i++ ) {
470470

471-
uint32_t index;
471+
uint64_t index;
472472

473473
mca_btl_tcp_addr_t* endpoint_addr = btl_proc->proc_addrs + i;
474474

@@ -478,7 +478,7 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
478478

479479
if (OPAL_SUCCESS != rc) {
480480
index = proc_data->num_peer_interfaces++;
481-
opal_hash_table_set_value_uint32(&proc_data->peer_kindex_to_index, endpoint_addr->addr_ifkindex, &index);
481+
opal_hash_table_set_value_uint32(&proc_data->peer_kindex_to_index, endpoint_addr->addr_ifkindex, (void**) index);
482482
if( proc_data->num_peer_interfaces == max_peer_interfaces ) {
483483
max_peer_interfaces <<= 1;
484484
peer_interfaces = (mca_btl_tcp_interface_t**)realloc( peer_interfaces,

0 commit comments

Comments
 (0)