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]
Message-ID: <9b50b920-5b62-fdcd-6648-0d0756c23df9@gmail.com>
Date:   Tue, 4 Sep 2018 09:27:17 -0600
From:   David Ahern <dsahern@...il.com>
To:     Stephen Hemminger <stephen@...workplumber.org>, dsahern@...nel.org
Cc:     netdev@...r.kernel.org, roopa@...ulusnetworks.com,
        sharpd@...ulusnetworks.com, idosch@...lanox.com,
        davem@...emloft.net
Subject: Re: [PATCH RFC net-next 18/18] net/ipv4: Optimization for fib_info
 lookup

On 9/1/18 2:43 PM, Stephen Hemminger wrote:
> 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.
> 

Side effect of copy-paste-adjust of the original. Will fix for the next
rfc (really need to not have 2 versions of the hashfn; need to think
through it).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ