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 16397374020..e6b1da050d3 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -51,10 +51,14 @@ typedef long psched_tdiff_t; #define PSCHED_GET_TIME(stamp) \ ((stamp) = PSCHED_NS2US(ktime_to_ns(ktime_get()))) -#define PSCHED_TDIFF_SAFE(tv1, tv2, bound) \ - min_t(long long, (tv1) - (tv2), bound) #define PSCHED_PASTPERFECT 0 +static inline psched_tdiff_t +psched_tdiff_bounded(psched_time_t tv1, psched_time_t tv2, psched_time_t bound) +{ + return min(tv1 - tv2, bound); +} + struct qdisc_watchdog { struct hrtimer timer; struct Qdisc *qdisc; |