]> git.ipfire.org Git - thirdparty/linux.git/commit
netfilter: nf_flow_table: count pending offload workqueue tasks
authorVlad Buslov <vladbu@nvidia.com>
Wed, 15 Jun 2022 10:43:55 +0000 (12:43 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 11 Jul 2022 14:25:14 +0000 (16:25 +0200)
commitb038177636f83bbf87c2b238706474145dd2cd04
treea6bb5e9804de43eb12800ad61e6918080227164f
parentfc54d9065f90dd25063883f404e6ff9a76913e73
netfilter: nf_flow_table: count pending offload workqueue tasks

To improve hardware offload debuggability count pending 'add', 'del' and
'stats' flow_table offload workqueue tasks. Counters are incremented before
scheduling new task and decremented when workqueue handler finishes
executing. These counters allow user to diagnose congestion on hardware
offload workqueues that can happen when either CPU is starved and workqueue
jobs are executed at lower rate than new ones are added or when
hardware/driver can't keep up with the rate.

Implement the described counters as percpu counters inside new struct
netns_ft which is stored inside struct net. Expose them via new procfs file
'/proc/net/stats/nf_flowtable' that is similar to existing 'nf_conntrack'
file.

Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Oz Shlomo <ozsh@nvidia.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/net_namespace.h
include/net/netfilter/nf_flow_table.h
include/net/netns/flow_table.h [new file with mode: 0644]
net/netfilter/Kconfig
net/netfilter/Makefile
net/netfilter/nf_flow_table_core.c
net/netfilter/nf_flow_table_offload.c
net/netfilter/nf_flow_table_procfs.c [new file with mode: 0644]