On 9/1/18 2:43 PM, Stephen Hemminger wrote:
> On Fri, 31 Aug 2018 17:49:53 -0700
> dsah...@kernel.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
On Fri, 31 Aug 2018 17:49:53 -0700
dsah...@kernel.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
From: David Ahern
Be optimistic about re-using a fib_info when nexthop id is given and
the route does not use metrics. Avoids a memory allocation which in
most cases is expected to be freed anyways.
Signed-off-by: David Ahern
---
net/ipv4/fib_semantics.c | 48 ++