diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2025-02-27 20:23:21 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-03-03 15:04:09 -0800 |
commit | 0dbca8c269ba786cde720d159f3c7dcbc2166f34 (patch) | |
tree | 4240b1757540bb65cc4294272b460c9fab57e96f /rust/helpers/helpers.c | |
parent | 84c75e94ecee7d783eb1d4282a66d6d26d848246 (diff) |
ipv4: fib: Remove fib_info_laddrhash pointer.
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 the fib_info_laddrhash pointer and instead use
fib_info_hash + (1 << fib_info_hash_bits).
While at it, fib_info_laddrhash_bucket() is moved near other
hash-table-specific functions.
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-6-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions