Skip to content

Commit bd07cc6

Browse files
committed
btl tcp: Improve initialization debugging
When creating TCP BTL modules, print more information about the module's ethernet association, including the first address associated with the device, as debug output. Fix a flipped output string for IPv4 and IPv6 addresses in the modex send code. Add the addresses being published in the modex to the debugging output in modex send, to help match failures in endpoint match. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent a012ee9 commit bd07cc6

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

opal/mca/btl/tcp/btl_tcp_component.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,12 @@ static int mca_btl_tcp_create(int if_kindex, const char* if_name)
564564
}
565565
}
566566

567-
#if 0 && OPAL_ENABLE_DEBUG
568-
BTL_OUTPUT(("interface %s instance %i: bandwidth %d latency %d\n", if_name, i,
569-
btl->super.btl_bandwidth, btl->super.btl_latency));
570-
#endif
567+
opal_output_verbose(5, opal_btl_base_framework.framework_output,
568+
"btl:tcp: %p: if %s kidx %d cnt %i addr %s %s bw %d lt %d\n",
569+
(void*)btl, if_name, (int) btl->tcp_ifkindex, i,
570+
opal_net_get_hostname((struct sockaddr*)&addr),
571+
(addr.ss_family == AF_INET) ? "IPv4" : "IPv6",
572+
btl->super.btl_bandwidth, btl->super.btl_latency);
571573
}
572574
return OPAL_SUCCESS;
573575
}
@@ -1154,7 +1156,8 @@ static int mca_btl_tcp_component_exchange(void)
11541156

11551157
opal_ifindextoname(index, ifn, sizeof(ifn));
11561158
opal_output_verbose(30, opal_btl_base_framework.framework_output,
1157-
"btl:tcp: examining interface %s", ifn);
1159+
"btl: tcp: component_exchange: examining interface %s",
1160+
ifn);
11581161
if (OPAL_SUCCESS !=
11591162
opal_ifindextoaddr(index, (struct sockaddr*) &my_ss,
11601163
sizeof (my_ss))) {
@@ -1179,7 +1182,9 @@ static int mca_btl_tcp_component_exchange(void)
11791182
opal_ifindextokindex (index);
11801183
current_addr++;
11811184
opal_output_verbose(30, opal_btl_base_framework.framework_output,
1182-
"btl:tcp: using ipv4 interface %s", ifn);
1185+
"btl: tcp: component_exchange: "
1186+
"%s IPv6 %s", ifn,
1187+
opal_net_get_hostname((struct sockaddr*)&my_ss));
11831188
} else
11841189
#endif
11851190
if ((AF_INET == my_ss.ss_family) &&
@@ -1196,7 +1201,9 @@ static int mca_btl_tcp_component_exchange(void)
11961201
opal_ifindextokindex (index);
11971202
current_addr++;
11981203
opal_output_verbose(30, opal_btl_base_framework.framework_output,
1199-
"btl:tcp: using ipv6 interface %s", ifn);
1204+
"btl: tcp: component_exchange: "
1205+
"%s IPv4 %s", ifn,
1206+
opal_net_get_hostname((struct sockaddr*)&my_ss));
12001207
}
12011208
} /* end of for opal_ifbegin() */
12021209
} /* end of for tcp_num_btls */

0 commit comments

Comments
 (0)