[Xorp-hackers] Patch to FEA to support multiple xorp instances on Linux.

Ben Greear greearb at candelatech.com
Fri Aug 28 11:16:15 PDT 2009


Attached is a patch for just my FEA changes (and a few related bits to make that
function properly).

I've tested this lightly with OSPF and two virtual routers
(no need for OSPF changes, it looks like all my hackings
in ospf are for debugging logic).  Seems to work as desired.

I'm using Fedora 11, 64-bit.

Much of this depends on features in Linux, but code *should* function
on other OS's as it used to, with no loss of functionality on those platforms.


This patch includes several features:

*  Optimize FEA netlink logic to pay attention to only routes in the routing table it is configured for.
    Big performance win with lots of xorp instances & routes.

*  Change iftree logic to only pay attention to interfaces configured for this instance of Xorp.
    This is a big performance win when you have hundreds or thousands of (probably virtual) interfaces.

    This patch also deals better with interfaces that come and go while Xorp is running (some
    fatal warnings related to suddenly disappeared interfaces are less severe.)

*  Allow reading info for a single interface instead of always requesting info for all interfaces
    via netlink.  This is another optimization that works well with the lazy construction of interface
    lists.


*  Allow using one socket per interface for multicast and other socket operations, instead of
    one global socket that listens to all interfaces.  This allows xorp to only receive events
    for interfaces it cares about...a big performance win when we have lots of xorp instances
    (and/or lots of interfaces that we do NOT want a particular xorp listening to).

    USE_SOCKET_PER_IFACE is the #ifdef that controls this.  It's currently set in code,
    but could be an scons variable.  See:  /fea/data_plane/io/io_ip_socket.hh

* Make lower levels of fea aware when interfaces come or go, so it can clean up sockets
   and/or multicast lists accordingly.  ( IoIpSocket::notifyDeletingIface,
   IoIpSocket::notifyDeletingVif, etc)


*  Support leaving all mcast groups for an interface.  Good to call when an interface is going
    away (protocols usually learn too late to specifically remove their groups from the mcast socket).


*  Support using multiple multicast routing tables.  This also requires a patch I made against
    the linux kernel to be functional.  If this could be accepted into xorp, I might have better luck getting the
    patch into linux.  This patch makes mfea_mrouter code a bit ugly, but it should be fully
    backwards compat with normal linux kernels and BSD, etc.


If/when we can get this patch (or similar) accepted, I'll post the patches for RIP, PIM, OLSR, and BGP,
etc.


Thanks,
Ben


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xorp_fea.patch
Url: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20090828/4d073640/attachment-0001.ksh 


More information about the Xorp-hackers mailing list