From: Jarek Poplawski Date: Tue, 16 Jun 2009 08:33:55 +0000 (+0000) Subject: pkt_sched: Update drops stats in act_police X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b964758050f856e44f5fe645d03bea8a1b0b66bd;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git pkt_sched: Update drops stats in act_police Action police statistics could be misleading because drops are not shown when expected. With feedback from: Jamal Hadi Salim Reported-by: Pawel Staszewski Signed-off-by: Jarek Poplawski Acked-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 f8f047b61245..723964c3ee4f 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -294,6 +294,8 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, if (police->tcfp_ewma_rate && police->tcf_rate_est.bps >= police->tcfp_ewma_rate) { police->tcf_qstats.overlimits++; + if (police->tcf_action == TC_ACT_SHOT) + police->tcf_qstats.drops++; spin_unlock(&police->tcf_lock); return police->tcf_action; } @@ -327,6 +329,8 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, } police->tcf_qstats.overlimits++; + if (police->tcf_action == TC_ACT_SHOT) + police->tcf_qstats.drops++; spin_unlock(&police->tcf_lock); return police->tcf_action; }