[Spread-users] Spread Multipath patch #4

Marc Zyngier Marc.Zyngier at evidian.com
Mon Nov 19 12:39:36 EST 2001

Hello all,

This is the fourth release of the multipath patch for Spread (against
3.16.1RC1). The purpose of patch is to send Spread traffic on multiple
networks, to support network failures in a high availability

As of this version, Spread traffic (both broadcasts and token
circulation) is replicated on all networks. There is no code to
handle primary/backup links yet, although we already introduced some
state information in this patch.

What's new :

* More broadcast/multicast binding fun :

It appears that the new way we bind sockets to receive broadcasts
doesn't work very well when it comes to multicast...

I have tried to generate all test cases, and came up with the
following matrix :

Bind address | Linux | Solaris | Win 2000
Broadcast    |   *   |    *    |    !    |
  address    |       |         |         |
-----------------------------------------| Broadcast cases
Interface    |   *   |    *    |    *    |
  address    |       |         |         |
Multicast    |   *   |    !    |    !    |
  address    |       |         |         |
Interface +  |   !   |    !    |    *    | Multicast cases
  membership |       |         |         |
INADDR_ANY + |   *   |    *    |    *    |
  membership |       |         |         |

* = works
! = fails to bind, to add membership or to receive...

I came up with a new, improved (and certainly very buggy) way of
binding broadcast reception sockets :

- First, bind multicast socket to INADDR_ANY. If more than one network
is declared as multicast, simply use membership to receive data on the
same socket.

- Second, bind broadcast sockets, only if there is no socket bound to

This changes has caused a lot of changes in network.c (most of
Net_init() code has been moved to multipath.c) and data_link.c
(membership management is now a separated function, since it can be
called independently from multipath.c).

You can now mix networks using both multicast and broadcast. I'm not
sure this is a very useful feature, but at least it seems to work
fine here.

* HP/UX preliminary port :

We have ported Spread (and the multipath patch) to HP/UX 11.00. Due to
the very picky compiler, this have generated a *lot* of small changes
all over the code (mainly prototype fixes...). I'm now at 121 warnings
down from 1044... :-)

Thanks to Jonathan Stanton, the patch is now available on the
spread.org web site (from the http://www.spread.org/devel.html page),
or more directly :

As usual, we welcome any comment, suggestion, or even flame...

Thanks a lot !


Marc Zyngier
Evidian - SafeKit Project
And don't forget you'll never get a dog to walk upright
Just 'cause you've got the power, that don't mean you've got the right.

More information about the Spread-users mailing list