[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180901134334.5fc199fb@xeon-e3>
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