aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/codel.h2
-rw-r--r--include/net/pkt_sched.h2
-rw-r--r--net/core/secure_seq.c6
-rw-r--r--net/netfilter/nf_conntrack_core.c2
-rw-r--r--net/netfilter/nf_conntrack_netlink.c2
-rw-r--r--net/netfilter/nf_conntrack_standalone.c2
-rw-r--r--net/sched/act_police.c4
-rw-r--r--net/sched/sch_fq.c4
-rw-r--r--net/sched/sch_htb.c6
-rw-r--r--net/sched/sch_tbf.c6
10 files changed, 18 insertions, 18 deletions
diff --git a/include/net/codel.h b/include/net/codel.h
index fe0eab32ce76..aeee28081245 100644
--- a/include/net/codel.h
+++ b/include/net/codel.h
@@ -66,7 +66,7 @@ typedef s32 codel_tdiff_t;
66 66
67static inline codel_time_t codel_get_time(void) 67static inline codel_time_t codel_get_time(void)
68{ 68{
69 u64 ns = ktime_to_ns(ktime_get()); 69 u64 ns = ktime_get_ns();
70 70
71 return ns >> CODEL_SHIFT; 71 return ns >> CODEL_SHIFT;
72} 72}
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index ec030cd76616..8bbe626e9ece 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -50,7 +50,7 @@ typedef long psched_tdiff_t;
50 50
51static inline psched_time_t psched_get_time(void) 51static inline psched_time_t psched_get_time(void)
52{ 52{
53 return PSCHED_NS2TICKS(ktime_to_ns(ktime_get())); 53 return PSCHED_NS2TICKS(ktime_get_ns());
54} 54}
55 55
56static inline psched_tdiff_t 56static inline psched_tdiff_t
diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c
index ba71212f0251..51dd3193a33e 100644
--- a/net/core/secure_seq.c
+++ b/net/core/secure_seq.c
@@ -35,7 +35,7 @@ static u32 seq_scale(u32 seq)
35 * overlaps less than one time per MSL (2 minutes). 35 * overlaps less than one time per MSL (2 minutes).
36 * Choosing a clock of 64 ns period is OK. (period of 274 s) 36 * Choosing a clock of 64 ns period is OK. (period of 274 s)
37 */ 37 */
38 return seq + (ktime_to_ns(ktime_get_real()) >> 6); 38 return seq + (ktime_get_real_ns() >> 6);
39} 39}
40#endif 40#endif
41 41
@@ -135,7 +135,7 @@ u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr,
135 md5_transform(hash, net_secret); 135 md5_transform(hash, net_secret);
136 136
137 seq = hash[0] | (((u64)hash[1]) << 32); 137 seq = hash[0] | (((u64)hash[1]) << 32);
138 seq += ktime_to_ns(ktime_get_real()); 138 seq += ktime_get_real_ns();
139 seq &= (1ull << 48) - 1; 139 seq &= (1ull << 48) - 1;
140 140
141 return seq; 141 return seq;
@@ -163,7 +163,7 @@ u64 secure_dccpv6_sequence_number(__be32 *saddr, __be32 *daddr,
163 md5_transform(hash, secret); 163 md5_transform(hash, secret);
164 164
165 seq = hash[0] | (((u64)hash[1]) << 32); 165 seq = hash[0] | (((u64)hash[1]) << 32);
166 seq += ktime_to_ns(ktime_get_real()); 166 seq += ktime_get_real_ns();
167 seq &= (1ull << 48) - 1; 167 seq &= (1ull << 48) - 1;
168 168
169 return seq; 169 return seq;
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index de88c4ab5146..0b634e7f1652 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -358,7 +358,7 @@ bool nf_ct_delete(struct nf_conn *ct, u32 portid, int report)
358 358
359 tstamp = nf_conn_tstamp_find(ct); 359 tstamp = nf_conn_tstamp_find(ct);
360 if (tstamp && tstamp->stop == 0) 360 if (tstamp && tstamp->stop == 0)
361 tstamp->stop = ktime_to_ns(ktime_get_real()); 361 tstamp->stop = ktime_get_real_ns();
362 362
363 if (nf_ct_is_dying(ct)) 363 if (nf_ct_is_dying(ct))
364 goto delete; 364 goto delete;
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 355a5c4ef763..1bd9ed9e62f6 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -1737,7 +1737,7 @@ ctnetlink_create_conntrack(struct net *net, u16 zone,
1737 } 1737 }
1738 tstamp = nf_conn_tstamp_find(ct); 1738 tstamp = nf_conn_tstamp_find(ct);
1739 if (tstamp) 1739 if (tstamp)
1740 tstamp->start = ktime_to_ns(ktime_get_real()); 1740 tstamp->start = ktime_get_real_ns();
1741 1741
1742 err = nf_conntrack_hash_check_insert(ct); 1742 err = nf_conntrack_hash_check_insert(ct);
1743 if (err < 0) 1743 if (err < 0)
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index f641751dba9d..cf65a1e040dd 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -101,7 +101,7 @@ static void *ct_seq_start(struct seq_file *seq, loff_t *pos)
101{ 101{
102 struct ct_iter_state *st = seq->private; 102 struct ct_iter_state *st = seq->private;
103 103
104 st->time_now = ktime_to_ns(ktime_get_real()); 104 st->time_now = ktime_get_real_ns();
105 rcu_read_lock(); 105 rcu_read_lock();
106 return ct_get_idx(seq, *pos); 106 return ct_get_idx(seq, *pos);
107} 107}
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:
231 if (ret != ACT_P_CREATED) 231 if (ret != ACT_P_CREATED)
232 return ret; 232 return ret;
233 233
234 police->tcfp_t_c = ktime_to_ns(ktime_get()); 234 police->tcfp_t_c = ktime_get_ns();
235 police->tcf_index = parm->index ? parm->index : 235 police->tcf_index = parm->index ? parm->index :
236 tcf_hash_new_index(hinfo); 236 tcf_hash_new_index(hinfo);
237 h = tcf_hash(police->tcf_index, POL_TAB_MASK); 237 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,
279 return police->tcfp_result; 279 return police->tcfp_result;
280 } 280 }
281 281
282 now = ktime_to_ns(ktime_get()); 282 now = ktime_get_ns();
283 toks = min_t(s64, now - police->tcfp_t_c, 283 toks = min_t(s64, now - police->tcfp_t_c,
284 police->tcfp_burst); 284 police->tcfp_burst);
285 if (police->peak_present) { 285 if (police->peak_present) {
diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
index ba32c2b005d0..e12f997e1b4c 100644
--- a/net/sched/sch_fq.c
+++ b/net/sched/sch_fq.c
@@ -416,7 +416,7 @@ static void fq_check_throttled(struct fq_sched_data *q, u64 now)
416static struct sk_buff *fq_dequeue(struct Qdisc *sch) 416static struct sk_buff *fq_dequeue(struct Qdisc *sch)
417{ 417{
418 struct fq_sched_data *q = qdisc_priv(sch); 418 struct fq_sched_data *q = qdisc_priv(sch);
419 u64 now = ktime_to_ns(ktime_get()); 419 u64 now = ktime_get_ns();
420 struct fq_flow_head *head; 420 struct fq_flow_head *head;
421 struct sk_buff *skb; 421 struct sk_buff *skb;
422 struct fq_flow *f; 422 struct fq_flow *f;
@@ -787,7 +787,7 @@ nla_put_failure:
787static int fq_dump_stats(struct Qdisc *sch, struct gnet_dump *d) 787static int fq_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
788{ 788{
789 struct fq_sched_data *q = qdisc_priv(sch); 789 struct fq_sched_data *q = qdisc_priv(sch);
790 u64 now = ktime_to_ns(ktime_get()); 790 u64 now = ktime_get_ns();
791 struct tc_fq_qd_stats st = { 791 struct tc_fq_qd_stats st = {
792 .gc_flows = q->stat_gc_flows, 792 .gc_flows = q->stat_gc_flows,
793 .highprio_packets = q->stat_internal_packets, 793 .highprio_packets = q->stat_internal_packets,
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 9f949abcacef..aea942ce6008 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -895,7 +895,7 @@ ok:
895 895
896 if (!sch->q.qlen) 896 if (!sch->q.qlen)
897 goto fin; 897 goto fin;
898 q->now = ktime_to_ns(ktime_get()); 898 q->now = ktime_get_ns();
899 start_at = jiffies; 899 start_at = jiffies;
900 900
901 next_event = q->now + 5LLU * NSEC_PER_SEC; 901 next_event = q->now + 5LLU * NSEC_PER_SEC;
@@ -1225,7 +1225,7 @@ static void htb_parent_to_leaf(struct htb_sched *q, struct htb_class *cl,
1225 parent->un.leaf.q = new_q ? new_q : &noop_qdisc; 1225 parent->un.leaf.q = new_q ? new_q : &noop_qdisc;
1226 parent->tokens = parent->buffer; 1226 parent->tokens = parent->buffer;
1227 parent->ctokens = parent->cbuffer; 1227 parent->ctokens = parent->cbuffer;
1228 parent->t_c = ktime_to_ns(ktime_get()); 1228 parent->t_c = ktime_get_ns();
1229 parent->cmode = HTB_CAN_SEND; 1229 parent->cmode = HTB_CAN_SEND;
1230} 1230}
1231 1231
@@ -1455,7 +1455,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
1455 cl->tokens = PSCHED_TICKS2NS(hopt->buffer); 1455 cl->tokens = PSCHED_TICKS2NS(hopt->buffer);
1456 cl->ctokens = PSCHED_TICKS2NS(hopt->cbuffer); 1456 cl->ctokens = PSCHED_TICKS2NS(hopt->cbuffer);
1457 cl->mbuffer = 60ULL * NSEC_PER_SEC; /* 1min */ 1457 cl->mbuffer = 60ULL * NSEC_PER_SEC; /* 1min */
1458 cl->t_c = ktime_to_ns(ktime_get()); 1458 cl->t_c = ktime_get_ns();
1459 cl->cmode = HTB_CAN_SEND; 1459 cl->cmode = HTB_CAN_SEND;
1460 1460
1461 /* attach to the hash list and parent's family */ 1461 /* attach to the hash list and parent's family */
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index 18ff63433709..0c39b754083b 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -239,7 +239,7 @@ static struct sk_buff *tbf_dequeue(struct Qdisc *sch)
239 s64 ptoks = 0; 239 s64 ptoks = 0;
240 unsigned int len = qdisc_pkt_len(skb); 240 unsigned int len = qdisc_pkt_len(skb);
241 241
242 now = ktime_to_ns(ktime_get()); 242 now = ktime_get_ns();
243 toks = min_t(s64, now - q->t_c, q->buffer); 243 toks = min_t(s64, now - q->t_c, q->buffer);
244 244
245 if (tbf_peak_present(q)) { 245 if (tbf_peak_present(q)) {
@@ -292,7 +292,7 @@ static void tbf_reset(struct Qdisc *sch)
292 292
293 qdisc_reset(q->qdisc); 293 qdisc_reset(q->qdisc);
294 sch->q.qlen = 0; 294 sch->q.qlen = 0;
295 q->t_c = ktime_to_ns(ktime_get()); 295 q->t_c = ktime_get_ns();
296 q->tokens = q->buffer; 296 q->tokens = q->buffer;
297 q->ptokens = q->mtu; 297 q->ptokens = q->mtu;
298 qdisc_watchdog_cancel(&q->watchdog); 298 qdisc_watchdog_cancel(&q->watchdog);
@@ -431,7 +431,7 @@ static int tbf_init(struct Qdisc *sch, struct nlattr *opt)
431 if (opt == NULL) 431 if (opt == NULL)
432 return -EINVAL; 432 return -EINVAL;
433 433
434 q->t_c = ktime_to_ns(ktime_get()); 434 q->t_c = ktime_get_ns();
435 qdisc_watchdog_init(&q->watchdog, sch); 435 qdisc_watchdog_init(&q->watchdog, sch);
436 q->qdisc = &noop_qdisc; 436 q->qdisc = &noop_qdisc;
437 437