summaryrefslogtreecommitdiffstats
path: root/include/net/act_api.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-07-06 05:18:04 -0700
committerDavid S. Miller <davem@davemloft.net>2015-07-08 13:50:41 -0700
commit519c818e8fb646eef1e8bfedd18519bec47bc9a9 (patch)
treed1c6f6dbe8833fa88e009c2bbae239d4ef4d1e26 /include/net/act_api.h
parent24ea591d2201c3257d666466e8fac50a6cf3c52f (diff)
downloadop-kernel-dev-519c818e8fb646eef1e8bfedd18519bec47bc9a9.zip
op-kernel-dev-519c818e8fb646eef1e8bfedd18519bec47bc9a9.tar.gz
net: sched: add percpu stats to actions
Reuse existing percpu infrastructure John Fastabend added for qdisc. This patch adds a new cpustats parameter to tcf_hash_create() and all actions pass false, meaning this patch should have no effect yet. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Alexei Starovoitov <ast@plumgrid.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r--include/net/act_api.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h
index 3ee4c92..db2063f 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -21,6 +21,8 @@ struct tcf_common {
struct gnet_stats_rate_est64 tcfc_rate_est;
spinlock_t tcfc_lock;
struct rcu_head tcfc_rcu;
+ struct gnet_stats_basic_cpu __percpu *cpu_bstats;
+ struct gnet_stats_queue __percpu *cpu_qstats;
};
#define tcf_head common.tcfc_head
#define tcf_index common.tcfc_index
@@ -103,7 +105,7 @@ int tcf_hash_release(struct tc_action *a, int bind);
u32 tcf_hash_new_index(struct tcf_hashinfo *hinfo);
int tcf_hash_check(u32 index, struct tc_action *a, int bind);
int tcf_hash_create(u32 index, struct nlattr *est, struct tc_action *a,
- int size, int bind);
+ int size, int bind, bool cpustats);
void tcf_hash_cleanup(struct tc_action *a, struct nlattr *est);
void tcf_hash_insert(struct tc_action *a);
OpenPOWER on IntegriCloud