From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 1/4] ipv6: Calculate hash thresholds for IPv6 nexthops Date: Tue, 9 Jan 2018 20:43:40 -0700 Message-ID: <5550c628-5014-427b-60c9-71cf80462723@gmail.com> References: <20180109144028.30133-1-idosch@mellanox.com> <20180109144028.30133-2-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-f53.google.com ([74.125.83.53]:42284 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965077AbeAJDnn (ORCPT ); Tue, 9 Jan 2018 22:43:43 -0500 Received: by mail-pg0-f53.google.com with SMTP id q67so9800572pga.9 for ; Tue, 09 Jan 2018 19:43:42 -0800 (PST) In-Reply-To: <20180109144028.30133-2-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: > Before we convert IPv6 to use hash-threshold instead of modulo-N, we > first need each nexthop to store its region boundary in the hash > function's output space. > > The boundary is calculated by dividing the output space equally between > the different active nexthops. That is, nexthops that are not dead or > linkdown. > > The boundaries are rebalanced whenever a nexthop is added or removed to > a multipath route and whenever a nexthop becomes active or inactive. > > Signed-off-by: Ido Schimmel > --- > include/net/ip6_fib.h | 1 + > include/net/ip6_route.h | 7 ++++ > net/ipv6/ip6_fib.c | 8 ++--- > net/ipv6/route.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 106 insertions(+), 6 deletions(-) > LGTM. Acked-by: David Ahern