diff options
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r-- | include/net/pkt_sched.h | 8 |
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 | ||
56 | static inline psched_tdiff_t | ||
57 | psched_tdiff_bounded(psched_time_t tv1, psched_time_t tv2, psched_time_t bound) | ||
58 | { | ||
59 | return min(tv1 - tv2, bound); | ||
60 | } | ||
61 | |||
58 | struct qdisc_watchdog { | 62 | struct qdisc_watchdog { |
59 | struct hrtimer timer; | 63 | struct hrtimer timer; |
60 | struct Qdisc *qdisc; | 64 | struct Qdisc *qdisc; |