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>
This commit is contained in:
committed by
David S. Miller
parent
24ea591d22
commit
519c818e8f
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user