diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-04-09 18:31:10 -0400 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-05-19 06:06:13 -0400 |
| commit | c7c32e72cbe23cea97c5d87ffcf6e23cc1ec1a65 (patch) | |
| tree | 82615a2c98f2cf8d3f7446aa31040c0791f93287 /include | |
| parent | 128ad3322ba5de8fa346203c9931d1fdcab8da87 (diff) | |
netfilter: nf_tables: defer all object release via rcu
Now that all objects are released in the reverse order via the
transaction infrastructure, we can enqueue the release via
call_rcu to save one synchronize_rcu. For small rule-sets loaded
via nft -f, it now takes around 50ms less here.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/netfilter/nf_tables.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 1ed2797fb964..7ee6ce6564ae 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h | |||
| @@ -393,12 +393,14 @@ struct nft_rule { | |||
| 393 | /** | 393 | /** |
| 394 | * struct nft_trans - nf_tables object update in transaction | 394 | * struct nft_trans - nf_tables object update in transaction |
| 395 | * | 395 | * |
| 396 | * @rcu_head: rcu head to defer release of transaction data | ||
| 396 | * @list: used internally | 397 | * @list: used internally |
| 397 | * @msg_type: message type | 398 | * @msg_type: message type |
| 398 | * @ctx: transaction context | 399 | * @ctx: transaction context |
| 399 | * @data: internal information related to the transaction | 400 | * @data: internal information related to the transaction |
| 400 | */ | 401 | */ |
| 401 | struct nft_trans { | 402 | struct nft_trans { |
| 403 | struct rcu_head rcu_head; | ||
| 402 | struct list_head list; | 404 | struct list_head list; |
| 403 | int msg_type; | 405 | int msg_type; |
| 404 | struct nft_ctx ctx; | 406 | struct nft_ctx ctx; |
