Lines Matching refs:opt
41 struct tc_sfq_qopt_v1 opt; in sfq_parse_opt() local
47 memset(&opt, 0, sizeof(opt)); in sfq_parse_opt()
52 if (get_size(&opt.v0.quantum, *argv)) { in sfq_parse_opt()
59 if (get_integer(&opt.v0.perturb_period, *argv, 0)) { in sfq_parse_opt()
66 if (get_u32(&opt.v0.limit, *argv, 0)) { in sfq_parse_opt()
70 if (opt.v0.limit < 2) { in sfq_parse_opt()
77 if (get_u32(&opt.v0.divisor, *argv, 0)) { in sfq_parse_opt()
84 if (get_u32(&opt.v0.flows, *argv, 0)) { in sfq_parse_opt()
91 if (get_u32(&opt.depth, *argv, 0)) { in sfq_parse_opt()
97 opt.headdrop = 1; in sfq_parse_opt()
101 if (get_u32(&opt.limit, *argv, 0)) { in sfq_parse_opt()
108 if (get_u32(&opt.qth_min, *argv, 0)) { in sfq_parse_opt()
115 if (get_u32(&opt.qth_max, *argv, 0)) { in sfq_parse_opt()
142 opt.flags |= TC_RED_ECN; in sfq_parse_opt()
145 opt.flags |= TC_RED_HARDDROP; in sfq_parse_opt()
158 if (!opt.limit) { in sfq_parse_opt()
166 if (!opt.qth_max) in sfq_parse_opt()
167 opt.qth_max = opt.limit / 4; in sfq_parse_opt()
168 if (!opt.qth_min) in sfq_parse_opt()
169 opt.qth_min = opt.qth_max / 3; in sfq_parse_opt()
171 burst = (2 * opt.qth_min + opt.qth_max) / (3 * avpkt); in sfq_parse_opt()
173 if (opt.qth_max > opt.limit) { in sfq_parse_opt()
178 if (opt.qth_min >= opt.qth_max) { in sfq_parse_opt()
183 wlog = tc_red_eval_ewma(opt.qth_min, burst, avpkt); in sfq_parse_opt()
190 opt.Wlog = wlog; in sfq_parse_opt()
192 wlog = tc_red_eval_P(opt.qth_min, opt.qth_max, probability); in sfq_parse_opt()
197 opt.Plog = wlog; in sfq_parse_opt()
198 opt.max_P = probability * pow(2, 32); in sfq_parse_opt()
202 addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt)); in sfq_parse_opt()
206 static int sfq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) in sfq_print_opt() argument
213 if (opt == NULL) in sfq_print_opt()
216 if (RTA_PAYLOAD(opt) < sizeof(*qopt)) in sfq_print_opt()
218 if (RTA_PAYLOAD(opt) >= sizeof(*qopt_ext)) in sfq_print_opt()
219 qopt_ext = RTA_DATA(opt); in sfq_print_opt()
220 qopt = RTA_DATA(opt); in sfq_print_opt()