Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Adrian Knoth (adi_at_[hidden])
Date: 2006-12-08 05:13:19


On Thu, Dec 07, 2006 at 11:12:23AM -0500, Jeff Squyres wrote:

Hi,

> > I therefore suggest to move the OPAL changes into the trunk,
> > also the small hostfile code (lex code for IPv6) and the btl code.
> Can you describe the changes in opal that were made for IPv6?

These changes are limited to three files: opal/util/if.[ch] and
the new opal/include/opal/ipv6compat.h. The latter one is only
required for compatibility with old SUSv2 systems.

In if.c, I've added IPv6 interface discovery for Linux and Solaris,
Thomas Peiselt also contributed getifaddrs() support for *BSD/OSX.
Helper functions were extended to deal with struct sockaddr_storage.

I've introduced CIDR netmask handling, so the netmask no longer
holds something like 111111110000 (a.s.o), but simply 8, 16 or
whatever. There are helper functions to convert from and to CIDR.

/* convert a netmask (in network byte order) to CIDR notation */
static int prefix (uint32_t netmask)

/* convert a CIDR prefixlen to netmask (in network byte order) */
uint32_t opal_prefix2netmask (uint32_t prefixlen)

I've also extended the interface struct, still containing if_index,
but that's just its number in the opal_list. The new field is
called if_kernel_index, representing the associated kernel interface
index for this device. My BTL/TCP code also exchanges this new
information to enable the remote to detect if two or more addresses
are assigned to the same interface, thus preventing oversubscription
(multiple connections to the same interface but to difference addresses,
 which is very likely if you have at least one IPv6 address and one
 IPv4 address on the same interface)

The code in if.c handles both, AF_INET and AF_INET6, so it's no
problem to use it without using IPv6 somewhere else (i.e. oob/tcp,
btl/tcp).

HTH

-- 
mail: adi_at_[hidden]  	http://adi.thur.de	PGP: v2-key via keyserver
Drink wet cement and get really stoned!