From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 3/4] ipv6: Use hash-threshold instead of modulo-N Date: Tue, 9 Jan 2018 20:54:00 -0700 Message-ID: <397562a6-35ec-c5e4-b819-9931c1e5d86f@gmail.com> References: <20180109144028.30133-1-idosch@mellanox.com> <20180109144028.30133-4-idosch@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com, pch@ordbogen.com, jkbs@redhat.com, yoshfuji@linux-ipv6.org, mlxsw@mellanox.com To: Ido Schimmel , netdev@vger.kernel.org Return-path: Received: from mail-pg0-f67.google.com ([74.125.83.67]:41457 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754368AbeAJDyC (ORCPT ); Tue, 9 Jan 2018 22:54:02 -0500 Received: by mail-pg0-f67.google.com with SMTP id m17so7465697pgd.8 for ; Tue, 09 Jan 2018 19:54:02 -0800 (PST) In-Reply-To: <20180109144028.30133-4-idosch@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 1/9/18 7:40 AM, Ido Schimmel wrote: > Now that each nexthop stores its region boundary in the multipath hash > function's output space, we can use hash-threshold instead of modulo-N > in multipath selection. > > This reduces the number of checks we need to perform during lookup, as > dead and linkdown nexthops are assigned a negative region boundary. In > addition, in contrast to modulo-N, only flows near region boundaries are > affected when a nexthop is added or removed. > > Signed-off-by: Ido Schimmel > --- > net/ipv6/route.c | 36 +++++++++++++----------------------- > 1 file changed, 13 insertions(+), 23 deletions(-) > Did you consider adding the net->ipv4.sysctl_fib_multipath_use_neigh check as well? ie., if set, verify neighbor is alive before picking that hop Acked-by: David Ahern