Lines Matching refs:opt
37 struct tc_red_qopt opt; in choke_parse_opt() local
48 memset(&opt, 0, sizeof(opt)); in choke_parse_opt()
53 if (get_unsigned(&opt.limit, *argv, 0)) { in choke_parse_opt()
67 if (get_unsigned(&opt.qth_min, *argv, 0)) { in choke_parse_opt()
73 if (get_unsigned(&opt.qth_max, *argv, 0)) { in choke_parse_opt()
106 if (!rate || !opt.limit) { in choke_parse_opt()
115 if (!opt.qth_max) in choke_parse_opt()
116 opt.qth_max = opt.limit / 4; in choke_parse_opt()
117 if (!opt.qth_min) in choke_parse_opt()
118 opt.qth_min = opt.qth_max / 3; in choke_parse_opt()
120 burst = (2 * opt.qth_min + opt.qth_max) / 3; in choke_parse_opt()
122 if (opt.qth_max > opt.limit) { in choke_parse_opt()
127 if (opt.qth_min >= opt.qth_max) { in choke_parse_opt()
132 wlog = tc_red_eval_ewma(opt.qth_min*avpkt, burst, avpkt); in choke_parse_opt()
139 opt.Wlog = wlog; in choke_parse_opt()
141 wlog = tc_red_eval_P(opt.qth_min*avpkt, opt.qth_max*avpkt, probability); in choke_parse_opt()
146 opt.Plog = wlog; in choke_parse_opt()
148 wlog = tc_red_eval_idle_damping(opt.Wlog, avpkt, rate, sbuf); in choke_parse_opt()
153 opt.Scell_log = wlog; in choke_parse_opt()
155 opt.flags |= TC_RED_ECN; in choke_parse_opt()
159 addattr_l(n, 1024, TCA_CHOKE_PARMS, &opt, sizeof(opt)); in choke_parse_opt()
167 static int choke_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) in choke_print_opt() argument
173 if (opt == NULL) in choke_print_opt()
176 parse_rtattr_nested(tb, TCA_CHOKE_MAX, opt); in choke_print_opt()