]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: act_ct: enable stats for HW offloaded entries
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Thu, 26 Nov 2020 18:40:49 +0000 (15:40 -0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 28 Nov 2020 19:43:40 +0000 (11:43 -0800)
commit2fbd43980bff279173e7b9cfe8946ce26964c31a
tree848eff510b83766c90fda92095a4d11a998bb2dc
parent4fd26be6d520d435f4ee481b278fa3eb9b75f58f
net/sched: act_ct: enable stats for HW offloaded entries

By setting NF_FLOWTABLE_COUNTER. Otherwise, the updates added by
commit a377bd2af400 ("netfilter: flowtable: add counter support in HW
offload") are not effective when using act_ct.

While at it, now that we have the flag set, protect the call to
nf_ct_acct_update() by commit 7aa70bfebce2 ("net/sched: act_ct: update
nf_conn_acct for act_ct SW offload in flowtable") with the check on
NF_FLOWTABLE_COUNTER, as also done on other places.

Note that this shouldn't impact performance as these stats are only
enabled when net.netfilter.nf_conntrack_acct is enabled.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: wenxu <wenxu@ucloud.cn>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Link: https://lore.kernel.org/r/481a65741261fd81b0a0813e698af163477467ec.1606415787.git.marcelo.leitner@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/act_ct.c