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

2006-08-04 Thread David Miller
From: "Ilpo Järvinen" <[EMAIL PROTECTED]> Date: Fri, 4 Aug 2006 18:44:20 +0300 (EEST) > 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 larg

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

2006-08-04 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