mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 23:51:37 +00:00
b038177636
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>
15 lines
287 B
C
15 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
|