diff options
-rw-r--r-- | accel-pppd/accel-ppp.conf | 1 | ||||
-rw-r--r-- | accel-pppd/shaper/limiter.c | 2 | ||||
-rw-r--r-- | accel-pppd/shaper/shaper.c | 8 | ||||
-rw-r--r-- | accel-pppd/shaper/shaper.h | 1 |
4 files changed, 11 insertions, 1 deletions
diff --git a/accel-pppd/accel-ppp.conf b/accel-pppd/accel-ppp.conf index c59b2056..86741f55 100644 --- a/accel-pppd/accel-ppp.conf +++ b/accel-pppd/accel-ppp.conf @@ -151,6 +151,7 @@ gw-ip-address=192.168.100.1 #mpu=0 #r2q=10 #quantum=1500 +#cburst=1534 #ifb=ifb0 up-limiter=police down-limiter=tbf diff --git a/accel-pppd/shaper/limiter.c b/accel-pppd/shaper/limiter.c index ab0e67a4..6becb395 100644 --- a/accel-pppd/shaper/limiter.c +++ b/accel-pppd/shaper/limiter.c @@ -110,7 +110,7 @@ static int qdisc_htb_class(struct qdisc_opt *qopt, struct nlmsghdr *n) log_ppp_error("shaper: failed to calculate ceil rate table.\n"); return -1; } - opt.cbuffer = tc_calc_xmittime(opt.ceil.rate, qopt->buffer); + opt.cbuffer = tc_calc_xmittime(opt.ceil.rate, conf_cburst); tail = NLMSG_TAIL(n); addattr_l(n, 1024, TCA_OPTIONS, NULL, 0); diff --git a/accel-pppd/shaper/shaper.c b/accel-pppd/shaper/shaper.c index 1363b98b..bcf705cd 100644 --- a/accel-pppd/shaper/shaper.c +++ b/accel-pppd/shaper/shaper.c @@ -38,6 +38,7 @@ double conf_latency = 0.05; int conf_mpu = 0; int conf_quantum = 1500; int conf_r2q = 10; +int conf_cburst = 1534; int conf_ifb_ifindex; int conf_up_limiter = LIM_POLICE; @@ -550,6 +551,9 @@ static int shaper_restore_exec(const char *cmd, char * const *f, int f_cnt, void { struct shaper_pd_t *pd; int all, found = 0;; + int *ptr = 0; + + *ptr = 1; if (f_cnt != 3) return CLI_CMD_SYNTAX; @@ -861,6 +865,10 @@ static void load_config(void) opt = conf_get_opt("shaper", "quantum"); if (opt && atoi(opt) >= 0) conf_quantum = atoi(opt); + + opt = conf_get_opt("shaper", "cburst"); + if (opt && atoi(opt) >= 0) + conf_cburst = atoi(opt); opt = conf_get_opt("shaper", "up-limiter"); if (opt) { diff --git a/accel-pppd/shaper/shaper.h b/accel-pppd/shaper/shaper.h index 2b0514ba..bd2a718c 100644 --- a/accel-pppd/shaper/shaper.h +++ b/accel-pppd/shaper/shaper.h @@ -14,6 +14,7 @@ extern double conf_latency; extern int conf_mpu; extern int conf_quantum; extern int conf_r2q; +extern int conf_cburst; extern int conf_ifb_ifindex; int install_limiter(struct ppp_t *ppp, int down_speed, int down_burst, int up_speed, int up_burst); |