summaryrefslogtreecommitdiff
path: root/net/sched/act_police.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-08-23 05:32:09 +0400
committerDavid S. Miller <davem@davemloft.net>2014-08-23 06:57:23 +0400
commitd2de875c6d4cbec8a99c880160181a3ed5b9992e (patch)
tree5dc09deacccbd946bc7f6b602c1b788fcdf842a6 /net/sched/act_police.c
parent3f8a2b746e3aece61f9c4714b86d1484d66461f0 (diff)
downloadlinux-d2de875c6d4cbec8a99c880160181a3ed5b9992e.tar.xz
net: use ktime_get_ns() and ktime_get_real_ns() helpers
ktime_get_ns() replaces ktime_to_ns(ktime_get()) ktime_get_real_ns() replaces ktime_to_ns(ktime_get_real()) Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_police.c')
-rw-r--r--net/sched/act_police.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 0566e4606a4a..f32bcb094915 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -231,7 +231,7 @@ override:
if (ret != ACT_P_CREATED)
return ret;
- police->tcfp_t_c = ktime_to_ns(ktime_get());
+ police->tcfp_t_c = ktime_get_ns();
police->tcf_index = parm->index ? parm->index :
tcf_hash_new_index(hinfo);
h = tcf_hash(police->tcf_index, POL_TAB_MASK);
@@ -279,7 +279,7 @@ static int tcf_act_police(struct sk_buff *skb, const struct tc_action *a,
return police->tcfp_result;
}
- now = ktime_to_ns(ktime_get());
+ now = ktime_get_ns();
toks = min_t(s64, now - police->tcfp_t_c,
police->tcfp_burst);
if (police->peak_present) {