Re: [PATCH] [PKT_SCHED] RED: Fix overflow in calculation of queue average

2006-08-03 Thread Stephen Hemminger
On Fri, 04 Aug 2006 00:33:32 +0300 Ilpo Järvinen <[EMAIL PROTECTED]> wrote: > Overflow can occur very easily with 32 bits, e.g., with 1 second > us_idle is approx. 2^20, which leaves only 11-Wlog bits for queue > length. Since the EWMA exponent is typically around 9, queue > lengths larger than 2

[PATCH] [PKT_SCHED] RED: Fix overflow in calculation of queue average

2006-08-03 Thread Ilpo Järvinen
Overflow can occur very easily with 32 bits, e.g., with 1 second us_idle is approx. 2^20, which leaves only 11-Wlog bits for queue length. Since the EWMA exponent is typically around 9, queue lengths larger than 2^2 cause overflow. Whether the affected branch is taken when us_idle is as high as 1 s