Lines Matching refs:opt
55 struct tc_gred_sopt opt = { 0 }; in init_gred() local
83 opt.DPs); in init_gred()
87 opt.grio = 1; in init_gred()
104 opt.DPs = dps; in init_gred()
105 opt.def_DP = def_dp; in init_gred()
107 DPRINTF("TC_GRED: sending DPs=%d default=%d\n",opt.DPs,opt.def_DP); in init_gred()
111 addattr_l(n, 1024, TCA_GRED_DPS, &opt, sizeof(struct tc_gred_sopt)); in init_gred()
121 struct tc_gred_qopt opt; in gred_parse_opt() local
131 memset(&opt, 0, sizeof(opt)); in gred_parse_opt()
136 if (get_size(&opt.limit, *argv)) { in gred_parse_opt()
150 if (get_size(&opt.qth_min, *argv)) { in gred_parse_opt()
157 if (get_size(&opt.qth_max, *argv)) { in gred_parse_opt()
164 opt.DP=strtol(*argv, (char **)NULL, 10); in gred_parse_opt()
165 DPRINTF ("\n ******* DP =%u\n",opt.DP); in gred_parse_opt()
166 if (opt.DP >MAX_DPs) { /* need a better error check */ in gred_parse_opt()
167 fprintf(stderr, "DP =%u \n",opt.DP); in gred_parse_opt()
196 opt.prio=strtol(*argv, (char **)NULL, 10); in gred_parse_opt()
220 if (!opt.qth_min || !opt.qth_max || !opt.limit || !avpkt || in gred_parse_opt()
221 (opt.DP<0)) { in gred_parse_opt()
227 burst = (2 * opt.qth_min + opt.qth_max) / (3 * avpkt); in gred_parse_opt()
231 if ((wlog = tc_red_eval_ewma(opt.qth_min, burst, avpkt)) < 0) { in gred_parse_opt()
238 opt.Wlog = wlog; in gred_parse_opt()
239 if ((wlog = tc_red_eval_P(opt.qth_min, opt.qth_max, probability)) < 0) { in gred_parse_opt()
243 opt.Plog = wlog; in gred_parse_opt()
244 if ((wlog = tc_red_eval_idle_damping(opt.Wlog, avpkt, rate, sbuf)) < 0) in gred_parse_opt()
250 opt.Scell_log = wlog; in gred_parse_opt()
254 addattr_l(n, 1024, TCA_GRED_PARMS, &opt, sizeof(opt)); in gred_parse_opt()
262 static int gred_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) in gred_print_opt() argument
274 if (opt == NULL) in gred_print_opt()
277 parse_rtattr_nested(tb, TCA_GRED_MAX, opt); in gred_print_opt()