public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] multipath routing algorithm, better patch
@ 2005-07-01  0:19 Patrick Jenkins
  2005-07-01  0:43 ` Patrick McHardy
  0 siblings, 1 reply; 6+ messages in thread
From: Patrick Jenkins @ 2005-07-01  0:19 UTC (permalink / raw)
  To: linux-kernel

Hi,

The last patch wont work, this should.

This patch assigns the multipath routing algorithm into the fib_info
struct's fib_mp_alg variable. Previously, the algorithm was always set to
IP_MP_ALG_NONE which was incorrect. This patch corrects the problem by
assigning the correct value when a fib_info is initialized.

This patch was tested against kernel 2.6.12.1 for all multipath routing
algorithms (none, round robin, interface round robin, random, weighted
random).

Please look this patch over and apply it to the kernel. I have been unable
to contact the creators of the multipath algorithm feature so this is why
I sent it to the lkml.

I am not a member of the list so please cc me in the reply.

Signed-off-by: Patrick Jenkins <patjenk@wam.umd.edu>

--- linux-2.6.12/net/ipv4/fib_semantics.c.orig  2005-06-30 
20:07:13.000000000 -0400
+++ linux-2.6.12/net/ipv4/fib_semantics.c       2005-06-30 
20:06:36.000000000 -0400
@@ -650,9 +650,22 @@ fib_create_info(const struct rtmsg *r, s
  #else
         const int nhs = 1;
  #endif
+
  #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
+
+#ifdef CONFIG_IP_ROUTE_MULTIPATH_RR
+       u32 mp_alg = IP_MP_ALG_RR;
+#elif CONFIG_IP_ROUTE_MULTIPATH_DRR
+       u32 mp_alg = IP_MP_ALG_DRR;
+#elif CONFIG_IP_ROUTE_MULTIPATH_RANDOM
+       u32 mp_alg = IP_MP_ALG_RANDOM;
+#elif CONFIG_IP_ROUTE_MULTIPATH_WRANDOM
+       u32 mp_alg = IP_MP_ALG_WRANDOM;
+#else
         u32 mp_alg = IP_MP_ALG_NONE;
-#endif
+#endif /* multipath algorithm determination */
+
+#endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */

         /* Fast check to catch the most weird cases */
         if (fib_props[r->rtm_type].scope > r->rtm_scope)


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [PATCH] multipath routing algorithm, better patch
@ 2005-07-05 15:17 Patrick Jenkins
  0 siblings, 0 replies; 6+ messages in thread
From: Patrick Jenkins @ 2005-07-05 15:17 UTC (permalink / raw)
  To: linux-kernel, netdev

>Thomas Graf wrote:
>> * Patrick McHardy <42C4919A.5000009@trash.net> 2005-07-01 02:43
>>
>>>If it isn't set correctly its an iproute problem. Did you actually
>>>experience any problems?
>>
>> Well, my patch for iproute2 to enable multipath algorithm selection
>> is currently being merged to Stephen together with the ematch bits.
>> We had to work out a dependency on GNU flex first (the berkley
>> version uses the same executable names) so the inclusion was
>> delayed a bit.
>
>So its no problem but simply missing support. BTW, do you know if
>Stephen's new CVS repository is exported somewhere?

Yes, we did experience a problem. The routing doesnt work as advertised 
(i.e. it wont utilize the multiple routes). Patrick is correct in saying 
its missing support.

>From what you are saying it seems the problem will be corrected by a new 
feature in iproute2 that allows the user to select this ability. Is this 
correct? Also, does this mean my patch is not needed? It seems to me that 
it should be supported somehow in the kernel seeing as how everyone might 
not utilize iproute2.

Once again, please cc me in the reply because I am not a member of the 
list.

Thanks,
Patrick Jenkins



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-07-05 15:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-01  0:19 [PATCH] multipath routing algorithm, better patch Patrick Jenkins
2005-07-01  0:43 ` Patrick McHardy
2005-07-01 17:41   ` Thomas Graf
2005-07-01 19:34     ` Patrick McHardy
2005-07-01 20:46       ` Thomas Graf
  -- strict thread matches above, loose matches on Subject: below --
2005-07-05 15:17 Patrick Jenkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox