diff options
| author | Ido Schimmel <idosch@nvidia.com> | 2026-10-14 11:26:11 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-10-16 18:52:34 -0700 |
| commit | 1b82d5ce3ba9155db746e87065bafb87a5f8666b (patch) | |
| tree | ec0ae11a5c74c822e5dc20341de385975815e81a /include | |
| parent | 8b0244ca4fa4e717ffe6874f7eadc59ebb6ae5ba (diff) | |
ipv4: Store netns in FIB table
The next patch will stop passing the network namespace to
fib_table_lookup() and instead pass the namespace from the FIB table to
the fib_table_lookup tracepoint. As a preparation, store the namespace
in the FIB table when the table is created.
The FIB table structure grows from 48 bytes to 56 bytes and still fits
in a single cache line.
No functional changes intended.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Björn Töpel <bjorn@kernel.org>
Reviewed-by: Björn Töpel <bjorn@kernel.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20261014082612.1280756-2-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ip_fib.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index fb446f01a65d..033ed8fce35e 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -258,6 +258,7 @@ struct fib_table { struct hlist_node tb_hlist; u32 tb_id; int tb_num_default; + struct net *tb_net; struct rcu_head rcu; unsigned long *tb_data; unsigned long __data[]; @@ -593,7 +594,8 @@ void fib_nh_common_release(struct fib_nh_common *nhc); /* Exported by fib_trie.c */ void fib_alias_hw_flags_set(struct net *net, const struct fib_rt_info *fri); void fib_trie_init(void); -struct fib_table *fib_trie_table(u32 id, struct fib_table *alias); +struct fib_table *fib_trie_table(struct net *net, u32 id, + struct fib_table *alias); bool fib_lookup_good_nhc(const struct fib_nh_common *nhc, int fib_flags, const struct flowi4 *flp); |
