diff options
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/act_police.c | 4 | ||||
-rw-r--r-- | net/sched/em_meta.c | 4 |
2 files changed, 6 insertions, 2 deletions
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, | |||
294 | if (police->tcfp_ewma_rate && | 294 | if (police->tcfp_ewma_rate && |
295 | police->tcf_rate_est.bps >= police->tcfp_ewma_rate) { | 295 | police->tcf_rate_est.bps >= police->tcfp_ewma_rate) { |
296 | police->tcf_qstats.overlimits++; | 296 | police->tcf_qstats.overlimits++; |
297 | if (police->tcf_action == TC_ACT_SHOT) | ||
298 | police->tcf_qstats.drops++; | ||
297 | spin_unlock(&police->tcf_lock); | 299 | spin_unlock(&police->tcf_lock); |
298 | return police->tcf_action; | 300 | return police->tcf_action; |
299 | } | 301 | } |
@@ -327,6 +329,8 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, | |||
327 | } | 329 | } |
328 | 330 | ||
329 | police->tcf_qstats.overlimits++; | 331 | police->tcf_qstats.overlimits++; |
332 | if (police->tcf_action == TC_ACT_SHOT) | ||
333 | police->tcf_qstats.drops++; | ||
330 | spin_unlock(&police->tcf_lock); | 334 | spin_unlock(&police->tcf_lock); |
331 | return police->tcf_action; | 335 | return police->tcf_action; |
332 | } | 336 | } |
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 266151ae85a3..18d85d259104 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -349,13 +349,13 @@ META_COLLECTOR(int_sk_type) | |||
349 | META_COLLECTOR(int_sk_rmem_alloc) | 349 | META_COLLECTOR(int_sk_rmem_alloc) |
350 | { | 350 | { |
351 | SKIP_NONLOCAL(skb); | 351 | SKIP_NONLOCAL(skb); |
352 | dst->value = atomic_read(&skb->sk->sk_rmem_alloc); | 352 | dst->value = sk_rmem_alloc_get(skb->sk); |
353 | } | 353 | } |
354 | 354 | ||
355 | META_COLLECTOR(int_sk_wmem_alloc) | 355 | META_COLLECTOR(int_sk_wmem_alloc) |
356 | { | 356 | { |
357 | SKIP_NONLOCAL(skb); | 357 | SKIP_NONLOCAL(skb); |
358 | dst->value = atomic_read(&skb->sk->sk_wmem_alloc); | 358 | dst->value = sk_wmem_alloc_get(skb->sk); |
359 | } | 359 | } |
360 | 360 | ||
361 | META_COLLECTOR(int_sk_omem_alloc) | 361 | META_COLLECTOR(int_sk_omem_alloc) |