mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
![Vlad Buslov](/assets/img/avatar_default.png)
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>
14 lines
287 B
C
14 lines
287 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __NETNS_FLOW_TABLE_H
|
|
#define __NETNS_FLOW_TABLE_H
|
|
|
|
struct nf_flow_table_stat {
|
|
unsigned int count_wq_add;
|
|
unsigned int count_wq_del;
|
|
unsigned int count_wq_stats;
|
|
};
|
|
|
|
struct netns_ft {
|
|
struct nf_flow_table_stat __percpu *stat;
|
|
};
|
|
#endif
|