From: Roman Mashak Date: Sun, 18 Sep 2016 11:53:08 +0000 (-0400) Subject: net sched actions police: peg drop stats for conforming traffic X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f71b109f1730902b73f70d78764d8a41265080dd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller --- 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; }