[Click] AverageCounter bug

rchertov@purdue.edu rchertov at purdue.edu
Thu Jan 4 17:34:39 EST 2007


I forgot the division by zero check in the previous patch.  The attached patch
handles that case.

Roman

Quoting rchertov at purdue.edu:

> Hello,
>    I noticed a bug with the AverageCounter when it would not report correct
> rates.  This usually would happen at GigE speeds when at least 10 million
> packets are sent.  The reported result would be much smaller than the actual
> true rate.  I have attached a fix that fixes the problem.  Previously I
> would
> get numbers that would sort of wrap around. 
> 
> E.X
> more /click/ctr/rate
> 600000
> more /click/ctr/rate
> 50000
> more /click/ctr/rate
> 23000
> more /click/ctr/rate
> 500000
> 
> Now, it turns out that I can send 1.5 million pps from one card to another on
> my
> machine.  I have also tested this fix for a variety of rates from udpgen and
> the
> reported rates from the counter are close to the desired rate.  Also at very
> high rates UDPGen can be off by as much as 50Kpps from the desired rate.
> 
> Roman Chertov


-------------- next part --------------
A non-text attachment was scrubbed...
Name: avg_counter.diff
Type: text/x-patch
Size: 684 bytes
Desc: not available
Url : https://amsterdam.lcs.mit.edu/pipermail/click/attachments/20070104/3b1875f0/avg_counter.bin


More information about the click mailing list