Lines Matching refs:opt
44 struct tc_tbf_qopt opt;
53 memset(&opt, 0, sizeof(opt));
58 if (opt.limit || latency) {
62 if (get_size(&opt.limit, *argv)) {
69 if (opt.limit || latency) {
116 if (opt.rate.rate) {
120 if (get_rate(&opt.rate.rate, *argv)) {
127 if (opt.peakrate.rate) {
131 if (get_rate(&opt.peakrate.rate, *argv)) {
164 if (opt.rate.rate == 0 || !buffer) {
168 if (opt.peakrate.rate) {
175 if (opt.limit == 0 && latency == 0) {
180 if (opt.limit == 0) {
181 double lim = opt.rate.rate*(double)latency/TIME_UNITS_PER_SEC + buffer;
182 if (opt.peakrate.rate) {
183 double lim2 = opt.peakrate.rate*(double)latency/TIME_UNITS_PER_SEC + mtu;
187 opt.limit = lim;
190 opt.rate.mpu = mpu;
191 opt.rate.overhead = overhead;
192 if (tc_calc_rtable(&opt.rate, rtab, Rcell_log, mtu, linklayer) < 0) {
196 opt.buffer = tc_calc_xmittime(opt.rate.rate, buffer);
198 if (opt.peakrate.rate) {
199 opt.peakrate.mpu = mpu;
200 opt.peakrate.overhead = overhead;
201 if (tc_calc_rtable(&opt.peakrate, ptab, Pcell_log, mtu, linklayer) < 0) {
205 opt.mtu = tc_calc_xmittime(opt.peakrate.rate, mtu);
210 addattr_l(n, 2024, TCA_TBF_PARMS, &opt, sizeof(opt));
212 if (opt.peakrate.rate)
218 static int tbf_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
227 if (opt == NULL)
230 parse_rtattr_nested(tb, TCA_TBF_PTAB, opt);