Lines Matching refs:opt
41 struct tc_sfq_qopt_v1 opt = {}; in sfq_parse_opt() local
50 if (get_size(&opt.v0.quantum, *argv)) { in sfq_parse_opt()
57 if (get_integer(&opt.v0.perturb_period, *argv, 0)) { in sfq_parse_opt()
64 if (get_u32(&opt.v0.limit, *argv, 0)) { in sfq_parse_opt()
68 if (opt.v0.limit < 2) { in sfq_parse_opt()
75 if (get_u32(&opt.v0.divisor, *argv, 0)) { in sfq_parse_opt()
82 if (get_u32(&opt.v0.flows, *argv, 0)) { in sfq_parse_opt()
89 if (get_u32(&opt.depth, *argv, 0)) { in sfq_parse_opt()
95 opt.headdrop = 1; in sfq_parse_opt()
99 if (get_u32(&opt.limit, *argv, 0)) { in sfq_parse_opt()
106 if (get_u32(&opt.qth_min, *argv, 0)) { in sfq_parse_opt()
113 if (get_u32(&opt.qth_max, *argv, 0)) { in sfq_parse_opt()
140 opt.flags |= TC_RED_ECN; in sfq_parse_opt()
143 opt.flags |= TC_RED_HARDDROP; in sfq_parse_opt()
156 if (!opt.limit) { in sfq_parse_opt()
164 if (!opt.qth_max) in sfq_parse_opt()
165 opt.qth_max = opt.limit / 4; in sfq_parse_opt()
166 if (!opt.qth_min) in sfq_parse_opt()
167 opt.qth_min = opt.qth_max / 3; in sfq_parse_opt()
169 burst = (2 * opt.qth_min + opt.qth_max) / (3 * avpkt); in sfq_parse_opt()
171 if (opt.qth_max > opt.limit) { in sfq_parse_opt()
176 if (opt.qth_min >= opt.qth_max) { in sfq_parse_opt()
181 wlog = tc_red_eval_ewma(opt.qth_min, burst, avpkt); in sfq_parse_opt()
188 opt.Wlog = wlog; in sfq_parse_opt()
190 wlog = tc_red_eval_P(opt.qth_min, opt.qth_max, probability); in sfq_parse_opt()
195 opt.Plog = wlog; in sfq_parse_opt()
196 opt.max_P = probability * pow(2, 32); in sfq_parse_opt()
200 addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt)); in sfq_parse_opt()
204 static int sfq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) in sfq_print_opt() argument
212 if (opt == NULL) in sfq_print_opt()
215 if (RTA_PAYLOAD(opt) < sizeof(*qopt)) in sfq_print_opt()
217 if (RTA_PAYLOAD(opt) >= sizeof(*qopt_ext)) in sfq_print_opt()
218 qopt_ext = RTA_DATA(opt); in sfq_print_opt()
219 qopt = RTA_DATA(opt); in sfq_print_opt()