diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-21 11:19:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-21 11:19:50 -0400 |
commit | eb6a12c2428d21a9f3e0f1a50e927d5fd80fc3d0 (patch) | |
tree | 5ac6f43899648abeab1d43aad3107f664e7f13d5 /net/sched/act_police.c | |
parent | c4762aba0b1f72659aae9ce37b772ca8bd8f06f4 (diff) | |
parent | 14b395e35d1afdd8019d11b92e28041fad591b71 (diff) |
Merge branch 'linus' into cpus4096-for-linus
Conflicts:
net/sunrpc/svc.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/sched/act_police.c')
-rw-r--r-- | net/sched/act_police.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 0898120bbcc0..32c3f9d9fb7a 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c | |||
@@ -272,7 +272,7 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, | |||
272 | 272 | ||
273 | spin_lock(&police->tcf_lock); | 273 | spin_lock(&police->tcf_lock); |
274 | 274 | ||
275 | police->tcf_bstats.bytes += skb->len; | 275 | police->tcf_bstats.bytes += qdisc_pkt_len(skb); |
276 | police->tcf_bstats.packets++; | 276 | police->tcf_bstats.packets++; |
277 | 277 | ||
278 | if (police->tcfp_ewma_rate && | 278 | if (police->tcfp_ewma_rate && |
@@ -282,7 +282,7 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, | |||
282 | return police->tcf_action; | 282 | return police->tcf_action; |
283 | } | 283 | } |
284 | 284 | ||
285 | if (skb->len <= police->tcfp_mtu) { | 285 | if (qdisc_pkt_len(skb) <= police->tcfp_mtu) { |
286 | if (police->tcfp_R_tab == NULL) { | 286 | if (police->tcfp_R_tab == NULL) { |
287 | spin_unlock(&police->tcf_lock); | 287 | spin_unlock(&police->tcf_lock); |
288 | return police->tcfp_result; | 288 | return police->tcfp_result; |
@@ -295,12 +295,12 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, | |||
295 | ptoks = toks + police->tcfp_ptoks; | 295 | ptoks = toks + police->tcfp_ptoks; |
296 | if (ptoks > (long)L2T_P(police, police->tcfp_mtu)) | 296 | if (ptoks > (long)L2T_P(police, police->tcfp_mtu)) |
297 | ptoks = (long)L2T_P(police, police->tcfp_mtu); | 297 | ptoks = (long)L2T_P(police, police->tcfp_mtu); |
298 | ptoks -= L2T_P(police, skb->len); | 298 | ptoks -= L2T_P(police, qdisc_pkt_len(skb)); |
299 | } | 299 | } |
300 | toks += police->tcfp_toks; | 300 | toks += police->tcfp_toks; |
301 | if (toks > (long)police->tcfp_burst) | 301 | if (toks > (long)police->tcfp_burst) |
302 | toks = police->tcfp_burst; | 302 | toks = police->tcfp_burst; |
303 | toks -= L2T(police, skb->len); | 303 | toks -= L2T(police, qdisc_pkt_len(skb)); |
304 | if ((toks|ptoks) >= 0) { | 304 | if ((toks|ptoks) >= 0) { |
305 | police->tcfp_t_c = now; | 305 | police->tcfp_t_c = now; |
306 | police->tcfp_toks = toks; | 306 | police->tcfp_toks = toks; |