I'm not sure I agree with change #1. I understand in principle why the change was made, but I'm uncomfortable with:
1. The individual entries now behave like pseudo-regexp's rather that strict matching. We used strict matching before this for a reason. If we want to allow regexp-like behavior, then I think we should enable that with special characters -- that's the customary/usual way to do it. 2. All other <foo>_in|exclude behavior in ompi is strict matching, not prefix matching. I'm uncomfortable with the disparity. Additionally, if loopback is now handled properly via change #2, shouldn't the default value for the btl_tcp_if_exclude parameter now be empty? Actually -- thinking about this a little more, does opal_net_islocalhost() guarantee to work on peer interfaces? On Mar 3, 2010, at 10:51 AM, <i...@osl.iu.edu> wrote: > Author: igb > Date: 2010-03-03 10:51:15 EST (Wed, 03 Mar 2010) > New Revision: 22762 > URL: https://svn.open-mpi.org/trac/ompi/changeset/22762 > > Log: > Fixed two problems: > > 1. The code that looks at btl_tcp_if_exclude before doing a > modex_send uses strcmp rather than strncmp. That means that > "lo0" gets sent even though "lo" is excluded. > > 2. The code that determines whether a particular local TCP > interface can connect to a particular remote interface doesn't > check for loopback interfaces. With this fix, users can now > enable "lo" and be assured that it will only be used for intra- > node communication. > > > Text files modified: > trunk/ompi/mca/btl/tcp/btl_tcp_component.c | 2 +- > > trunk/ompi/mca/btl/tcp/btl_tcp_proc.c | 25 > +++++++++++++++++++++++-- > 2 files changed, 24 insertions(+), 3 deletions(-) > > Modified: trunk/ompi/mca/btl/tcp/btl_tcp_component.c > ============================================================================== > --- trunk/ompi/mca/btl/tcp/btl_tcp_component.c (original) > +++ trunk/ompi/mca/btl/tcp/btl_tcp_component.c 2010-03-03 10:51:15 EST (Wed, > 03 Mar 2010) > @@ -610,7 +610,7 @@ > /* check to see if this interface exists in the exclude list */ > argv = exclude; > while(argv && *argv) { > - if(strcmp(*argv,if_name) == 0) > + if(strncmp(*argv,if_name,strlen(*argv)) == 0) > break; > argv++; > } > > Modified: trunk/ompi/mca/btl/tcp/btl_tcp_proc.c > ============================================================================== > --- trunk/ompi/mca/btl/tcp/btl_tcp_proc.c (original) > +++ trunk/ompi/mca/btl/tcp/btl_tcp_proc.c 2010-03-03 10:51:15 EST (Wed, > 03 Mar 2010) > @@ -504,8 +504,18 @@ > if(NULL != local_interfaces[i]->ipv4_address && > NULL != peer_interfaces[j]->ipv4_address) { > > + /* check for loopback */ > + if ((opal_net_islocalhost((struct sockaddr > *)local_interfaces[i]->ipv4_address) > + && !opal_net_islocalhost((struct sockaddr > *)peer_interfaces[j]->ipv4_address)) > + || (opal_net_islocalhost((struct sockaddr > *)peer_interfaces[j]->ipv4_address) > + && !opal_net_islocalhost((struct sockaddr > *)local_interfaces[i]->ipv4_address)) > + || (opal_net_islocalhost((struct sockaddr > *)local_interfaces[i]->ipv4_address) > + && > !opal_ifislocal(btl_proc->proc_ompi->proc_hostname))) { > + > + /* No connection is possible on these interfaces */ > + > /* check for RFC1918 */ > - if(opal_net_addr_isipv4public((struct sockaddr*) > local_interfaces[i]->ipv4_address) > + } else if(opal_net_addr_isipv4public((struct sockaddr*) > local_interfaces[i]->ipv4_address) > && opal_net_addr_isipv4public((struct sockaddr*) > > peer_interfaces[j]->ipv4_address)) { > if(opal_net_samenetwork((struct sockaddr*) > local_interfaces[i]->ipv4_address, > @@ -534,7 +544,18 @@ > */ > if(NULL != local_interfaces[i]->ipv6_address && > NULL != peer_interfaces[j]->ipv6_address) { > - if(opal_net_samenetwork((struct sockaddr*) > local_interfaces[i]->ipv6_address, > + > + /* check for loopback */ > + if ((opal_net_islocalhost((struct sockaddr > *)local_interfaces[i]->ipv6_address) > + && !opal_net_islocalhost((struct sockaddr > *)peer_interfaces[j]->ipv6_address)) > + || (opal_net_islocalhost((struct sockaddr > *)peer_interfaces[j]->ipv6_address) > + && !opal_net_islocalhost((struct sockaddr > *)local_interfaces[i]->ipv6_address)) > + || (opal_net_islocalhost((struct sockaddr > *)local_interfaces[i]->ipv6_address) > + && > !opal_ifislocal(btl_proc->proc_ompi->proc_hostname))) { > + > + /* No connection is possible on these interfaces */ > + > + } else if(opal_net_samenetwork((struct sockaddr*) > local_interfaces[i]->ipv6_address, > (struct sockaddr*) > peer_interfaces[j]->ipv6_address, > local_interfaces[i]->ipv6_netmask)) { > weights[i][j] = CQ_PUBLIC_SAME_NETWORK; > _______________________________________________ > svn-full mailing list > svn-f...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/svn-full > -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/