return -1;
}
if (wlog >= 10)
- fprintf(stderr, "CHOKE: WARNING. Burst %d seems to be to large.\n", burst);
+ fprintf(stderr, "CHOKE: WARNING. Burst %d seems to be too large.\n", burst);
opt.Wlog = wlog;
wlog = tc_red_eval_P(opt.qth_min*avpkt, opt.qth_max*avpkt, probability);
if (rate == 0)
get_rate(&rate, "10Mbit");
- if (!opt.qth_min || !opt.qth_max || !burst || !opt.limit || !avpkt ||
+ if (!opt.qth_min || !opt.qth_max || !opt.limit || !avpkt ||
(opt.DP<0)) {
- fprintf(stderr, "Required parameter (min, max, burst, limit, "
+ fprintf(stderr, "Required parameter (min, max, limit, "
"avpkt, DP) is missing\n");
return -1;
}
+ if (!burst) {
+ burst = (2 * opt.qth_min + opt.qth_max) / (3 * avpkt);
+ fprintf(stderr, "GRED: set burst to %u\n", burst);
+ }
if ((wlog = tc_red_eval_ewma(opt.qth_min, burst, avpkt)) < 0) {
fprintf(stderr, "GRED: failed to calculate EWMA constant.\n");
return -1;
}
if (wlog >= 10)
- fprintf(stderr, "GRED: WARNING. Burst %d seems to be to "
+ fprintf(stderr, "GRED: WARNING. Burst %d seems to be too "
"large.\n", burst);
opt.Wlog = wlog;
if ((wlog = tc_red_eval_P(opt.qth_min, opt.qth_max, probability)) < 0) {
if (rate == 0)
get_rate(&rate, "10Mbit");
- if (!opt.qth_min || !opt.qth_max || !burst || !opt.limit || !avpkt) {
- fprintf(stderr, "Required parameter (min, max, burst, limit, avpkt) is missing\n");
+ if (!opt.qth_min || !opt.qth_max || !opt.limit || !avpkt) {
+ fprintf(stderr, "RED: Required parameter (min, max, limit, avpkt) is missing\n");
return -1;
}
-
+ if (!burst) {
+ burst = (2 * opt.qth_min + opt.qth_max) / (3 * avpkt);
+ fprintf(stderr, "RED: set burst to %u\n", burst);
+ }
if ((wlog = tc_red_eval_ewma(opt.qth_min, burst, avpkt)) < 0) {
fprintf(stderr, "RED: failed to calculate EWMA constant.\n");
return -1;
}
if (wlog >= 10)
- fprintf(stderr, "RED: WARNING. Burst %d seems to be to large.\n", burst);
+ fprintf(stderr, "RED: WARNING. Burst %d seems to be too large.\n", burst);
opt.Wlog = wlog;
if ((wlog = tc_red_eval_P(opt.qth_min, opt.qth_max, probability)) < 0) {
fprintf(stderr, "RED: failed to calculate probability.\n");