X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fnet%2Fred.h;h=3cf31d466a81254e019aac768666458ffbae6009;hb=2af6b9d518ddfbc4d6990d5f9c9b1a05341c1cef;hp=a4eb37946f2cdf1c63f22cc19341a88e6bd76cca;hpb=da547d775fa9ba8d9dcaee7bc4e960540e2be576;p=pandora-kernel.git diff --git a/include/net/red.h b/include/net/red.h index a4eb37946f2c..3cf31d466a81 100644 --- a/include/net/red.h +++ b/include/net/red.h @@ -151,17 +151,17 @@ static inline void red_set_parms(struct red_parms *p, static inline int red_is_idling(struct red_parms *p) { - return !PSCHED_IS_PASTPERFECT(p->qidlestart); + return p->qidlestart != PSCHED_PASTPERFECT; } static inline void red_start_of_idle_period(struct red_parms *p) { - PSCHED_GET_TIME(p->qidlestart); + p->qidlestart = psched_get_time(); } static inline void red_end_of_idle_period(struct red_parms *p) { - PSCHED_SET_PASTPERFECT(p->qidlestart); + p->qidlestart = PSCHED_PASTPERFECT; } static inline void red_restart(struct red_parms *p) @@ -177,8 +177,8 @@ static inline unsigned long red_calc_qavg_from_idle_time(struct red_parms *p) long us_idle; int shift; - PSCHED_GET_TIME(now); - us_idle = PSCHED_TDIFF_SAFE(now, p->qidlestart, p->Scell_max); + now = psched_get_time(); + us_idle = psched_tdiff_bounded(now, p->qidlestart, p->Scell_max); /* * The problem: ideally, average length queue recalcultion should