lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1dedd203-78ad-5290-fe27-9a8d376a991a@gmail.com>
Date:   Tue, 9 Jan 2018 20:48:37 -0700
From:   David Ahern <dsahern@...il.com>
To:     Ido Schimmel <idosch@...lanox.com>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, roopa@...ulusnetworks.com,
        nikolay@...ulusnetworks.com, pch@...bogen.com, jkbs@...hat.com,
        yoshfuji@...ux-ipv6.org, mlxsw@...lanox.com
Subject: Re: [PATCH net-next 4/4] ipv6: Add support for non-equal-cost
 multipath

On 1/9/18 7:40 AM, Ido Schimmel wrote:
> The use of hash-threshold instead of modulo-N makes it trivial to add
> support for non-equal-cost multipath.
> 
> Instead of dividing the multipath hash function's output space equally
> between the nexthops, each nexthop is assigned a region size which is
> proportional to its weight.
> 
> Signed-off-by: Ido Schimmel <idosch@...lanox.com>
> ---
>  include/net/ip6_fib.h |  1 +
>  net/ipv6/route.c      | 11 +++++++----
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
> index 97cd05d87780..34ec321d6a03 100644
> --- a/include/net/ip6_fib.h
> +++ b/include/net/ip6_fib.h
> @@ -171,6 +171,7 @@ struct rt6_info {
>  	u32				rt6i_metric;
>  	u32				rt6i_pmtu;
>  	/* more non-fragment space at head required */
> +	int				rt6i_nh_weight;
>  	unsigned short			rt6i_nfheader_len;
>  	u8				rt6i_protocol;
>  	u8				exception_bucket_flushed:1,

Since dst is cacheline aligned there is a hole after rt6i_nh_flags. In
patch 1 you put rt6i_nh_upper_bound in that hole. Putting the weight
there too keeps those variables together as well as using the open space.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ