diff options
author | Florian Westphal <fw@strlen.de> | 2017-05-01 22:18:01 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-01 16:22:40 -0400 |
commit | 48e75b430670ebdbb00ba008e1d3690f61ab9824 (patch) | |
tree | dd330346101070359c7b1f84becb2bd72aad4780 /lib | |
parent | e06422c43968916dc945018fd9220f60866470b1 (diff) | |
download | linux-48e75b430670ebdbb00ba008e1d3690f61ab9824.tar.bz2 |
rhashtable: compact struct rhashtable_params
By using smaller datatypes this (rather large) struct shrinks considerably
(80 -> 48 bytes on x86_64).
As this is embedded in other structs, this also rerduces size of several
others, e.g. cls_fl_head or nft_hash.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rhashtable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c index 3895486ef551..a930e436db5d 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c @@ -967,7 +967,7 @@ int rhashtable_init(struct rhashtable *ht, ht->max_elems = ht->p.max_size * 2; } - ht->p.min_size = max(ht->p.min_size, HASH_MIN_SIZE); + ht->p.min_size = max_t(u16, ht->p.min_size, HASH_MIN_SIZE); if (params->nelem_hint) size = rounded_hashtable_size(&ht->p); |