netfilter: nf_tables: dynamically allocate hooks per net_device in flowtables
Use a list of hooks per device instead an array. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
@@ -963,6 +963,12 @@ struct nft_stats {
|
||||
struct u64_stats_sync syncp;
|
||||
};
|
||||
|
||||
struct nft_hook {
|
||||
struct list_head list;
|
||||
struct nf_hook_ops ops;
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct nft_base_chain - nf_tables base chain
|
||||
*
|
||||
@@ -1173,7 +1179,7 @@ struct nft_flowtable {
|
||||
use:30;
|
||||
u64 handle;
|
||||
/* runtime data below here */
|
||||
struct nf_hook_ops *ops ____cacheline_aligned;
|
||||
struct list_head hook_list ____cacheline_aligned;
|
||||
struct nf_flowtable data;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user