Skip to content

Commit

Permalink
net sched actions police: peg drop stats for conforming traffic
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roman Mashak authored and David S. Miller committed Sep 20, 2016
1 parent 408fbc2 commit f71b109
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/sched/act_police.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f71b109

Please sign in to comment.