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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 1 Sep 2018 13:43:34 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     dsahern@...nel.org
Cc:     netdev@...r.kernel.org, roopa@...ulusnetworks.com,
        sharpd@...ulusnetworks.com, idosch@...lanox.com,
        davem@...emloft.net, David Ahern <dsahern@...il.com>
Subject: Re: [PATCH RFC net-next 18/18] net/ipv4: Optimization for fib_info
 lookup

On Fri, 31 Aug 2018 17:49:53 -0700
dsahern@...nel.org wrote:

> +static inline unsigned int fib_info_hashfn_cfg(const struct fib_config *cfg)
> +{
> +	unsigned int mask = (fib_info_hash_size - 1);
> +	unsigned int val = 0;
> +
> +	val ^= (cfg->fc_protocol << 8) | cfg->fc_scope;

Why do assignment to 0 than do initial xor?
Why not instead just do assignment in the first statement which would be clearer.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ