inet: Add a count to struct inet_listen_hashbucket
authorMartin KaFai Lau <kafai@fb.com>
Fri, 1 Dec 2017 20:52:29 +0000 (12:52 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Dec 2017 15:18:27 +0000 (10:18 -0500)
commit76d013b20ba9a5f88eee7c90ac82cbc3ee64be18
tree7db33c2816dda86781e70cb1da2ffebf4e81a390
parentfb7516d42478ebc8e2f00efb76ef96f7b68fd8d3
inet: Add a count to struct inet_listen_hashbucket

This patch adds a count to the 'struct inet_listen_hashbucket'.
It counts how many sk is hashed to a bucket.  It will be
used to decide if the (to-be-added) portaddr listener's hashtable
should be used during inet[6]_lookup_listener().

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_hashtables.h
net/ipv4/inet_hashtables.c