OSDN Git Service

netfilter: conntrack: move ct counter to net_generic data
authorFlorian Westphal <fw@strlen.de>
Mon, 12 Apr 2021 19:55:43 +0000 (21:55 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 13 Apr 2021 11:10:39 +0000 (13:10 +0200)
commitc53bd0e96662c2f77109e08a9889c9e1ee86c52d
treee465cc24808ff62968cc474dcb8d2f8b33db6768
parentf6f2e580d5f7152fb5ab11232edecb7fbeca3759
netfilter: conntrack: move ct counter to net_generic data

Its only needed from slowpath (sysctl, ctnetlink, gc worker) and
when a new conntrack object is allocated.

Furthermore, each write dirties the otherwise read-mostly pernet
data in struct net.ct, which are accessed from packet path.

Move it to the net_generic data.  This makes struct netns_ct
read-mostly.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack.h
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_standalone.c