[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5701AA39.5010002@cumulusnetworks.com>
Date: Sun, 3 Apr 2016 17:41:45 -0600
From: David Ahern <dsa@...ulusnetworks.com>
To: Julian Anastasov <ja@....bg>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH v4 net-next] net: ipv4: Consider failed nexthops in
multipath routes
On 4/3/16 3:57 PM, Julian Anastasov wrote:
>
> Hello,
>
> On Sun, 3 Apr 2016, David Ahern wrote:
>
>> --- a/Documentation/networking/ip-sysctl.txt
>> +++ b/Documentation/networking/ip-sysctl.txt
>> @@ -63,6 +63,16 @@ fwmark_reflect - BOOLEAN
>> fwmark of the packet they are replying to.
>> Default: 0
>>
>> +fib_multipath_use_neigh - BOOLEAN
>> + Use status of existing neighbor entry when determining nexthop for
>> + multipath routes. If disabled neighbor information is not used and
>
> Comma from v3 is removed?
>
>> + packets could be directed to a failed nexthop. Only valid for kernels
>
>> --- a/net/ipv4/fib_semantics.c
>> +++ b/net/ipv4/fib_semantics.c
>> void fib_select_multipath(struct fib_result *res, int hash)
>> {
>> struct fib_info *fi = res->fi;
>> + struct net *net = fi->fib_net;
>> + bool first = false;
>>
>> for_nexthops(fi) {
>> if (hash > atomic_read(&nh->nh_upper_bound))
>> continue;
>>
>> - res->nh_sel = nhsel;
>> - return;
>> + if (!net->ipv4.sysctl_fib_multipath_use_neigh ||
>> + fib_good_nh(nh)) {
>> + res->nh_sel = nhsel;
>> + return;
>> + }
>> + if (!first) {
>> + res->nh_sel = nhsel;
>> + first = true;
>> + }
>> } endfor_nexthops(fi);
>>
>> /* Race condition: route has just become dead. */
>
> The 'res->nh_sel = 0;' that is here should be
> removed because it invalidates the above assignment.
>
right. will send a v5
Powered by blists - more mailing lists