netdev
[Top] [All Lists]

Re: [PATCH] multipath routing algorithm, better patch

To: Patrick Jenkins <patjenk@xxxxxxxxxxx>
Subject: Re: [PATCH] multipath routing algorithm, better patch
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Fri, 01 Jul 2005 02:43:06 +0200
Cc: linux-kernel@xxxxxxxxxxxxxxx, Maillist netdev <netdev@xxxxxxxxxxx>
In-reply-to: <Pine.GSO.4.61.0506302014160.7400@rac1.wam.umd.edu>
References: <Pine.GSO.4.61.0506302014160.7400@rac1.wam.umd.edu>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.8) Gecko/20050514 Debian/1.7.8-1
Patrick Jenkins wrote:
> 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).

Multiple algorithms can be compiled in at once, so this patch is wrong.
mp_alg is supplied by userspace:

        if (rta->rta_mp_alg) {
                mp_alg = *rta->rta_mp_alg;

                if (mp_alg < IP_MP_ALG_NONE ||
                    mp_alg > IP_MP_ALG_MAX)
                        goto err_inval;
        }

If it isn't set correctly its an iproute problem. Did you actually
experience any problems?

Regards
Patrick

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH] multipath routing algorithm, better patch, Patrick McHardy <=