Skip to content

Commit f71b109

Browse files
Roman Mashakdavem330
authored andcommitted
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>
1 parent 408fbc2 commit f71b109

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/sched/act_police.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ static int tcf_act_police(struct sk_buff *skb, const struct tc_action *a,
249249
police->tcfp_t_c = now;
250250
police->tcfp_toks = toks;
251251
police->tcfp_ptoks = ptoks;
252+
if (police->tcfp_result == TC_ACT_SHOT)
253+
police->tcf_qstats.drops++;
252254
spin_unlock(&police->tcf_lock);
253255
return police->tcfp_result;
254256
}

0 commit comments

Comments
 (0)