[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1322737471.2335.25.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Date: Thu, 01 Dec 2011 12:04:31 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Dave Taht <dave.taht@...il.com>
Cc: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Stephen Hemminger <shemminger@...tta.com>
Subject: [PATCH iproute2] red: give a hint about burst value
Le mercredi 30 novembre 2011 à 23:44 +0100, Eric Dumazet a écrit :
> Le mercredi 30 novembre 2011 à 23:35 +0100, Dave Taht a écrit :
>
> > One of my other problems is when I try to size red (or choke) appropriately
> > (or so I think) for GigE bandwidths and queue depths, it would fail
> > to calculate the ewma value.
>
> Do you have one example of such failure ?
>
Oh I understand your burst value is really too small.
Stephen, can we add this helper to iproute2 ?
[PATCH iproute2] red: try to give hint about burst value
Reported-by: Dave Taht <dave.taht@...il.com>
Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
---
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;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists