aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_police.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/act_police.c')
-rw-r--r--net/sched/act_police.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 65d60a3f7761..616f465f407e 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -241,7 +241,7 @@ override:
241 if (ret != ACT_P_CREATED) 241 if (ret != ACT_P_CREATED)
242 return ret; 242 return ret;
243 243
244 PSCHED_GET_TIME(police->tcfp_t_c); 244 police->tcfp_t_c = psched_get_time();
245 police->tcf_index = parm->index ? parm->index : 245 police->tcf_index = parm->index ? parm->index :
246 tcf_hash_new_index(&police_idx_gen, &police_hash_info); 246 tcf_hash_new_index(&police_idx_gen, &police_hash_info);
247 h = tcf_hash(police->tcf_index, POL_TAB_MASK); 247 h = tcf_hash(police->tcf_index, POL_TAB_MASK);
@@ -296,8 +296,7 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a,
296 return police->tcfp_result; 296 return police->tcfp_result;
297 } 297 }
298 298
299 PSCHED_GET_TIME(now); 299 now = psched_get_time();
300
301 toks = psched_tdiff_bounded(now, police->tcfp_t_c, 300 toks = psched_tdiff_bounded(now, police->tcfp_t_c,
302 police->tcfp_burst); 301 police->tcfp_burst);
303 if (police->tcfp_P_tab) { 302 if (police->tcfp_P_tab) {
@@ -495,7 +494,7 @@ struct tcf_police *tcf_police_locate(struct rtattr *rta, struct rtattr *est)
495 } 494 }
496 if (police->tcfp_P_tab) 495 if (police->tcfp_P_tab)
497 police->tcfp_ptoks = L2T_P(police, police->tcfp_mtu); 496 police->tcfp_ptoks = L2T_P(police, police->tcfp_mtu);
498 PSCHED_GET_TIME(police->tcfp_t_c); 497 police->tcfp_t_c = psched_get_time();
499 police->tcf_index = parm->index ? parm->index : 498 police->tcf_index = parm->index ? parm->index :
500 tcf_police_new_index(); 499 tcf_police_new_index();
501 police->tcf_action = parm->action; 500 police->tcf_action = parm->action;
@@ -543,7 +542,7 @@ int tcf_police(struct sk_buff *skb, struct tcf_police *police)
543 return police->tcfp_result; 542 return police->tcfp_result;
544 } 543 }
545 544
546 PSCHED_GET_TIME(now); 545 now = psched_get_time();
547 toks = psched_tdiff_bounded(now, police->tcfp_t_c, 546 toks = psched_tdiff_bounded(now, police->tcfp_t_c,
548 police->tcfp_burst); 547 police->tcfp_burst);
549 if (police->tcfp_P_tab) { 548 if (police->tcfp_P_tab) {