aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/pkt_sched.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-03-23 14:29:11 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:27:54 -0400
commit03cc45c0a5b9b7f74768feb43b9a2525d203bbdb (patch)
treeacb5b1d692c9fdf526863f641547744b0a2d38a0 /include/net/pkt_sched.h
parent8edc0c31d6b7849b0fb50db86824830769241939 (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 'include/net/pkt_sched.h')
-rw-r--r--include/net/pkt_sched.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 163973740207..e6b1da050d32 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -51,10 +51,14 @@ typedef long psched_tdiff_t;
51#define PSCHED_GET_TIME(stamp) \ 51#define PSCHED_GET_TIME(stamp) \
52 ((stamp) = PSCHED_NS2US(ktime_to_ns(ktime_get()))) 52 ((stamp) = PSCHED_NS2US(ktime_to_ns(ktime_get())))
53 53
54#define PSCHED_TDIFF_SAFE(tv1, tv2, bound) \
55 min_t(long long, (tv1) - (tv2), bound)
56#define PSCHED_PASTPERFECT 0 54#define PSCHED_PASTPERFECT 0
57 55
56static inline psched_tdiff_t
57psched_tdiff_bounded(psched_time_t tv1, psched_time_t tv2, psched_time_t bound)
58{
59 return min(tv1 - tv2, bound);
60}
61
58struct qdisc_watchdog { 62struct qdisc_watchdog {
59 struct hrtimer timer; 63 struct hrtimer timer;
60 struct Qdisc *qdisc; 64 struct Qdisc *qdisc;