]> www.infradead.org Git - users/dwmw2/linux.git/commit
ipv4: fib: Remove fib_info_hash_size.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 28 Feb 2025 04:23:22 +0000 (20:23 -0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 3 Mar 2025 23:04:10 +0000 (15:04 -0800)
commitd6306b9d98850a1a7247eb10fe5bb78506ee343b
treeb62ad0fe484923ecea82673b1f4e0e9e49fb14e0
parent0dbca8c269ba786cde720d159f3c7dcbc2166f34
ipv4: fib: Remove fib_info_hash_size.

We will allocate the fib_info hash tables per netns.

There are 5 global variables for fib_info hash tables:
fib_info_hash, fib_info_laddrhash, fib_info_hash_size,
fib_info_hash_bits, fib_info_cnt.

However, fib_info_laddrhash and fib_info_hash_size can be
easily calculated from fib_info_hash and fib_info_hash_bits.

Let's remove fib_info_hash_size and use (1 << fib_info_hash_bits)
instead.

Now we need not pass the new hash table size to fib_info_hash_move().

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20250228042328.96624-7-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/fib_semantics.c