Commit b964758050f856e44f5fe645d03bea8a1b0b66bd
Committed by
David S. Miller
1 parent
e4f1482e68
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 <hadi@cyberus.ca> Reported-by: Pawel Staszewski <pstaszewski@itcare.pl> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
net/sched/act_police.c
... | ... | @@ -294,6 +294,8 @@ |
294 | 294 | if (police->tcfp_ewma_rate && |
295 | 295 | police->tcf_rate_est.bps >= police->tcfp_ewma_rate) { |
296 | 296 | police->tcf_qstats.overlimits++; |
297 | + if (police->tcf_action == TC_ACT_SHOT) | |
298 | + police->tcf_qstats.drops++; | |
297 | 299 | spin_unlock(&police->tcf_lock); |
298 | 300 | return police->tcf_action; |
299 | 301 | } |
... | ... | @@ -327,6 +329,8 @@ |
327 | 329 | } |
328 | 330 | |
329 | 331 | police->tcf_qstats.overlimits++; |
332 | + if (police->tcf_action == TC_ACT_SHOT) | |
333 | + police->tcf_qstats.drops++; | |
330 | 334 | spin_unlock(&police->tcf_lock); |
331 | 335 | return police->tcf_action; |
332 | 336 | } |