summaryrefslogtreecommitdiffstats
path: root/net/sched/act_police.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-03-23 11:29:11 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:27:54 -0700
commit03cc45c0a5b9b7f74768feb43b9a2525d203bbdb (patch)
treeacb5b1d692c9fdf526863f641547744b0a2d38a0 /net/sched/act_police.c
parent8edc0c31d6b7849b0fb50db86824830769241939 (diff)
downloadlinux-03cc45c0a5b9b7f74768feb43b9a2525d203bbdb.tar.gz
linux-03cc45c0a5b9b7f74768feb43b9a2525d203bbdb.tar.bz2
linux-03cc45c0a5b9b7f74768feb43b9a2525d203bbdb.zip
[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.c8
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,
PSCHED_GET_TIME(now);
- toks = PSCHED_TDIFF_SAFE(now, police->tcfp_t_c,
- police->tcfp_burst);
+ toks = psched_tdiff_bounded(now, police->tcfp_t_c,
+ police->tcfp_burst);
if (police->tcfp_P_tab) {
ptoks = toks + police->tcfp_ptoks;
if (ptoks > (long)L2T_P(police, police->tcfp_mtu))
@@ -544,8 +544,8 @@ int tcf_police(struct sk_buff *skb, struct tcf_police *police)
}
PSCHED_GET_TIME(now);
- toks = PSCHED_TDIFF_SAFE(now, police->tcfp_t_c,
- police->tcfp_burst);
+ toks = psched_tdiff_bounded(now, police->tcfp_t_c,
+ police->tcfp_burst);
if (police->tcfp_P_tab) {
ptoks = toks + police->tcfp_ptoks;
if (ptoks > (long)L2T_P(police, police->tcfp_mtu))