diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-23 14:29:11 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:27:54 -0400 |
commit | 03cc45c0a5b9b7f74768feb43b9a2525d203bbdb (patch) | |
tree | acb5b1d692c9fdf526863f641547744b0a2d38a0 /net/sched/act_police.c | |
parent | 8edc0c31d6b7849b0fb50db86824830769241939 (diff) |
[NET_SCHED]: turn PSCHED_TDIFF_SAFE into inline function
Also rename to psched_tdiff_bounded.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 0a5679ea6c64..65d60a3f7761 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c | |||
@@ -298,8 +298,8 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, | |||
298 | 298 | ||
299 | PSCHED_GET_TIME(now); | 299 | PSCHED_GET_TIME(now); |
300 | 300 | ||
301 | toks = PSCHED_TDIFF_SAFE(now, police->tcfp_t_c, | 301 | toks = psched_tdiff_bounded(now, police->tcfp_t_c, |
302 | police->tcfp_burst); | 302 | police->tcfp_burst); |
303 | if (police->tcfp_P_tab) { | 303 | if (police->tcfp_P_tab) { |
304 | ptoks = toks + police->tcfp_ptoks; | 304 | ptoks = toks + police->tcfp_ptoks; |
305 | if (ptoks > (long)L2T_P(police, police->tcfp_mtu)) | 305 | if (ptoks > (long)L2T_P(police, police->tcfp_mtu)) |
@@ -544,8 +544,8 @@ int tcf_police(struct sk_buff *skb, struct tcf_police *police) | |||
544 | } | 544 | } |
545 | 545 | ||
546 | PSCHED_GET_TIME(now); | 546 | PSCHED_GET_TIME(now); |
547 | toks = PSCHED_TDIFF_SAFE(now, police->tcfp_t_c, | 547 | toks = psched_tdiff_bounded(now, police->tcfp_t_c, |
548 | police->tcfp_burst); | 548 | police->tcfp_burst); |
549 | if (police->tcfp_P_tab) { | 549 | if (police->tcfp_P_tab) { |
550 | ptoks = toks + police->tcfp_ptoks; | 550 | ptoks = toks + police->tcfp_ptoks; |
551 | if (ptoks > (long)L2T_P(police, police->tcfp_mtu)) | 551 | if (ptoks > (long)L2T_P(police, police->tcfp_mtu)) |