]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conncount: Split insert and traversal
authorYi-Hung Wei <yihung.wei@gmail.com>
Tue, 3 Jul 2018 00:33:43 +0000 (17:33 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 18 Jul 2018 09:26:36 +0000 (11:26 +0200)
commitcb7e4b30632f2d899d328cfb03a6153238dc4702
tree3167b1fba32b9938934f77d5be7a1c6f346cd152
parentcd0dfd9c98f0ba6aad3f908708100f2631c244c2
netfilter: nf_conncount: Split insert and traversal

This patch is originally from Florian Westphal.

When we have a very coarse grouping, e.g. by large subnets, zone id,
etc, it's likely that we do not need to do tree rotation because
we'll find a node where we can attach new entry.  Based on this
observation, we split tree traversal and insertion.

Later on, we can make traversal lockless (tree protected
by RCU), and add extra lock in the individual nodes to protect list
insertion/deletion, thereby allowing parallel insert/delete in different
tree nodes.

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conncount.c