summaryrefslogtreecommitdiffstats
path: root/net/netfilter/nft_log.c
diff options
context:
space:
mode:
authorPablo Neira2016-12-11 11:43:59 +0100
committerDavid S. Miller2016-12-11 16:01:05 +0100
commitd84701ecbcd6ad63faa7a9c18ad670d1c4d561c0 (patch)
tree2f47271a763a580df89a081a03731b78027fea6c /net/netfilter/nft_log.c
parente1000: use disable_hardirq() for e1000_netpoll() (diff)
downloadkernel-qcow2-linux-d84701ecbcd6ad63faa7a9c18ad670d1c4d561c0.tar.gz
kernel-qcow2-linux-d84701ecbcd6ad63faa7a9c18ad670d1c4d561c0.tar.xz
kernel-qcow2-linux-d84701ecbcd6ad63faa7a9c18ad670d1c4d561c0.zip
netfilter: nft_counter: rework atomic dump and reset
Dump and reset doesn't work unless cmpxchg64() is used both from packet and control plane paths. This approach is going to be slow though. Instead, use a percpu seqcount to fetch counters consistently, then subtract bytes and packets in case a reset was requested. The cpu that running over the reset code is guaranteed to own this stats exclusively, we have to turn counters into signed 64bit though so stats update on reset don't get wrong on underflow. This patch is based on original sketch from Eric Dumazet. Fixes: 43da04a593d8 ("netfilter: nf_tables: atomic dump and reset for stateful objects") Suggested-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/nft_log.c')
0 files changed, 0 insertions, 0 deletions