~ubuntu-branches/ubuntu/raring/iproute/raring-proposed

« back to all changes in this revision

Viewing changes to tc/tc_red.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-05-22 14:10:07 UTC
  • mfrom: (1.1.15) (23.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120522141007-uuwicj2cx2x71vfb
Tags: 20120319-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Mark iproute as Multi-Arch: foreign.
  - Add cross-building support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
        double W = 0.5;
57
57
        double a = (double)burst + 1 - (double)qmin/avpkt;
58
58
 
59
 
        if (a < 1.0)
 
59
        if (a < 1.0) {
 
60
                fprintf(stderr, "tc_red_eval_ewma() burst %u is too small ?"
 
61
                                " Try burst %u\n", burst, 1 + qmin/avpkt);
60
62
                return -1;
 
63
        }
61
64
        for (wlog=1; wlog<32; wlog++, W /= 2) {
62
65
                if (a <= (1 - pow(1-W, burst))/W)
63
66
                        return wlog;