mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 13:23:02 -04:00
Merge branch 'net-misc-follow-up-on-rtnl-less-fib_rules-series'
Kuniyuki Iwashima says: ==================== net: Misc follow-up on RTNL-less fib_rules series. Patch 1 moves net->ipv4.fib_table_hash_lock under CONFIG_IP_MULTIPLE_TABLES. Patch 2 adds mutex_destroy() for fib_rules_ops.lock. ==================== Link: https://patch.msgid.link/20260702044437.591864-1-kuniyu@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
@@ -22,6 +22,7 @@ struct_mutex ra_mutex
|
||||
struct_fib_rules_ops* rules_ops
|
||||
struct_fib_table fib_main
|
||||
struct_fib_table fib_default
|
||||
spinlock_t fib_table_hash_lock
|
||||
unsigned_int fib_rules_require_fldissect
|
||||
bool fib_has_custom_rules
|
||||
bool fib_has_custom_local_routes
|
||||
|
||||
@@ -118,6 +118,7 @@ struct netns_ipv4 {
|
||||
struct fib_rules_ops *rules_ops;
|
||||
struct fib_table __rcu *fib_main;
|
||||
struct fib_table __rcu *fib_default;
|
||||
spinlock_t fib_table_hash_lock;
|
||||
unsigned int fib_rules_require_fldissect;
|
||||
bool fib_has_custom_rules;
|
||||
#endif
|
||||
@@ -127,7 +128,6 @@ struct netns_ipv4 {
|
||||
atomic_t fib_num_tclassid_users;
|
||||
#endif
|
||||
struct hlist_head *fib_table_hash;
|
||||
spinlock_t fib_table_hash_lock;
|
||||
struct sock *fibnl;
|
||||
struct hlist_head *fib_info_hash;
|
||||
unsigned int fib_info_hash_bits;
|
||||
|
||||
@@ -203,6 +203,7 @@ void fib_rules_unregister(struct fib_rules_ops *ops)
|
||||
spin_unlock(&net->rules_mod_lock);
|
||||
|
||||
fib_rules_cleanup_ops(ops);
|
||||
mutex_destroy(&ops->lock);
|
||||
kfree_rcu(ops, rcu);
|
||||
}
|
||||
|
||||
|
||||
@@ -1584,7 +1584,10 @@ static int __net_init ip_fib_net_init(struct net *net)
|
||||
net->ipv4.sysctl_fib_multipath_hash_fields =
|
||||
FIB_MULTIPATH_HASH_FIELD_DEFAULT_MASK;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IP_MULTIPLE_TABLES
|
||||
spin_lock_init(&net->ipv4.fib_table_hash_lock);
|
||||
#endif
|
||||
|
||||
/* Avoid false sharing : Use at least a full cache line */
|
||||
size = max_t(size_t, size, L1_CACHE_BYTES);
|
||||
|
||||
Reference in New Issue
Block a user