diff options
author | Roman Mashak <mrv@mojatatu.com> | 2016-09-18 07:53:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-19 22:04:14 -0400 |
commit | f71b109f1730902b73f70d78764d8a41265080dd (patch) | |
tree | d7a2e03a775b005a7b5e21e26019dc13b1135f34 /net | |
parent | 408fbc22ef1efb00dd896acd00e9f7d9b641e047 (diff) |
net sched actions police: peg drop stats for conforming traffic
setting conforming action to drop is a valid policy.
When it is set we need to at least see the stats indicating it
for debugging.
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/act_police.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 8a3be1d99775..ba7074b391ae 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -249,6 +249,8 @@ static int tcf_act_police(struct sk_buff *skb, const struct tc_action *a, police->tcfp_t_c = now; police->tcfp_toks = toks; police->tcfp_ptoks = ptoks; + if (police->tcfp_result == TC_ACT_SHOT) + police->tcf_qstats.drops++; spin_unlock(&police->tcf_lock); return police->tcfp_result; } |