Lines Matching refs:wrr

185 	struct tc_cbq_wrropt wrr = {};  in cbq_parse_class_opt()  local
283 wrr.priority = prio; in cbq_parse_class_opt()
287 if (get_size(&wrr.allot, *argv)) { in cbq_parse_class_opt()
306 if (get_size(&wrr.weight, *argv)) { in cbq_parse_class_opt()
355 unsigned int pktsize = wrr.allot; in cbq_parse_class_opt()
357 if (wrr.allot < (lss.avpkt*3)/2) in cbq_parse_class_opt()
358 wrr.allot = (lss.avpkt*3)/2; in cbq_parse_class_opt()
379 if (wrr.priority == 0 && (n->nlmsg_flags&NLM_F_EXCL)) { in cbq_parse_class_opt()
381 wrr.priority = TC_CBQ_MAXPRIO; in cbq_parse_class_opt()
382 if (wrr.allot == 0) in cbq_parse_class_opt()
383 wrr.allot = (lss.avpkt*3)/2; in cbq_parse_class_opt()
386 if (wrr.weight == 0) in cbq_parse_class_opt()
387 wrr.weight = (wrr.priority == TC_CBQ_MAXPRIO) ? 1 : r.rate; in cbq_parse_class_opt()
388 if (wrr.allot == 0) { in cbq_parse_class_opt()
415 addattr_l(n, 1024, TCA_CBQ_WRROPT, &wrr, sizeof(wrr)); in cbq_parse_class_opt()
439 struct tc_cbq_wrropt *wrr = NULL; in cbq_print_opt() local
465 if (RTA_PAYLOAD(tb[TCA_CBQ_WRROPT]) < sizeof(*wrr)) in cbq_print_opt()
468 wrr = RTA_DATA(tb[TCA_CBQ_WRROPT]); in cbq_print_opt()
516 if (wrr) { in cbq_print_opt()
517 if (wrr->priority != TC_CBQ_MAXPRIO) in cbq_print_opt()
518 fprintf(f, "prio %u", wrr->priority); in cbq_print_opt()
524 fprintf(f, "/%u ", wrr->cpriority); in cbq_print_opt()
525 if (wrr->weight != 1) { in cbq_print_opt()
526 print_rate(buf, sizeof(buf), wrr->weight); in cbq_print_opt()
529 if (wrr->allot) in cbq_print_opt()
530 fprintf(f, "allot %ub ", wrr->allot); in cbq_print_opt()