From: David Ahern <dsa@cumulusnetworks•com>
To: Julian Anastasov <ja@ssi•bg>
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH v4 net-next] net: ipv4: Consider failed nexthops in multipath routes
Date: Sun, 3 Apr 2016 17:41:45 -0600 [thread overview]
Message-ID: <5701AA39.5010002@cumulusnetworks.com> (raw)
In-Reply-To: <alpine.LFD.2.11.1604040039020.1534@ja.home.ssi.bg>
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
prev parent reply other threads:[~2016-04-03 23:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-03 19:19 [PATCH v4 net-next] net: ipv4: Consider failed nexthops in multipath routes David Ahern
2016-04-03 21:57 ` Julian Anastasov
2016-04-03 23:41 ` David Ahern [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5701AA39.5010002@cumulusnetworks.com \
--to=dsa@cumulusnetworks$(echo .)com \
--cc=ja@ssi$(echo .)bg \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox