Subject: Re: Multipath
To: David Young <>
From: Mihai Chelaru <>
List: tech-net
Date: 08/23/2007 13:29:05
David Young wrote:

> BTW, round-robin is not ordinarily a good multipath routing policy.
> RADIX_MPATH references gateway "selection by Modulo-N Hash (RFC2991)".
> Check that out.

Thanks for pointing me that. The problem with such implementation is that it 
is protocol depedant. I'll implement few algorithms including this header 
hashing next days but probably I'll have to leave round-robin as default 

Also I have to implement unequal ballancing but I don't think that the current 
rt_metrics struct can help me and probably I'll have to add another variable 

> I see a couple of places where you clear the RNF_ACTIVE bit in
> rtrequest1(); resist the temptation. 

I avoid there a call to rn_delete1 in order to keep radix node alive and 
RNF_ACTIVE must be cleared for rtfree() afterwards. Isn't it OK ?

> You also memcpy the radix_nodes. 

This is a must in order to avoid double allocation of netmask. Or isn't it ?

> Do not touch the radix trie data structures directly, but use the
> radix_node_head methods, instead.  I suggest doing a delete+add with
> the old and new "head" rtentry.

Are you talking about rtentry memcpy in rtfree() ? I was thinking that it's 
faster and harmless.
> I don't think that you should RTFREE() chained rtentries in rtflush(),
> unless you are going to increase the reference count on an rtentry's
> chained rtentries when you rtcache() it.

ewww... I shouldn't traverse the list there. Thanks for pointing me that.