Message ID | 1322737471.2335.25.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
diff --git a/tc/tc_red.c b/tc/tc_red.c index 66658ca..a65435e 100644 --- a/tc/tc_red.c +++ b/tc/tc_red.c @@ -56,8 +56,11 @@ int tc_red_eval_ewma(unsigned qmin, unsigned burst, unsigned avpkt) double W = 0.5; double a = (double)burst + 1 - (double)qmin/avpkt; - if (a < 1.0) + if (a < 1.0) { + fprintf(stderr, "tc_red_eval_ewma() burst %u is too small ?" + " Try burst %u\n", burst, 1 + qmin/avpkt); return -1; + } for (wlog=1; wlog<32; wlog++, W /= 2) { if (a <= (1 - pow(1-W, burst))/W) return wlog;