Lines Matching refs:lss
53 struct tc_cbq_lssopt lss = {}; in cbq_parse_opt() local
159 lss.ewma_log = ewma_log; in cbq_parse_opt()
160 lss.maxidle = tc_calc_xmittime(r.rate, avpkt); in cbq_parse_opt()
161 lss.change = TCF_CBQ_LSS_MAXIDLE|TCF_CBQ_LSS_EWMA|TCF_CBQ_LSS_AVPKT; in cbq_parse_opt()
162 lss.avpkt = avpkt; in cbq_parse_opt()
167 addattr_l(n, 1024, TCA_CBQ_LSSOPT, &lss, sizeof(lss)); in cbq_parse_opt()
184 struct tc_cbq_lssopt lss = {}; in cbq_parse_class_opt() local
212 if (get_u32(&lss.minidle, *argv, 0)) { in cbq_parse_class_opt()
216 lss.change |= TCF_CBQ_LSS_MINIDLE; in cbq_parse_class_opt()
223 lss.change |= TCF_CBQ_LSS_OFFTIME; in cbq_parse_class_opt()
230 lss.change |= TCF_CBQ_LSS_MAXIDLE; in cbq_parse_class_opt()
232 lss.flags |= TCF_CBQ_LSS_BOUNDED; in cbq_parse_class_opt()
233 lss.change |= TCF_CBQ_LSS_FLAGS; in cbq_parse_class_opt()
235 lss.flags &= ~TCF_CBQ_LSS_BOUNDED; in cbq_parse_class_opt()
236 lss.change |= TCF_CBQ_LSS_FLAGS; in cbq_parse_class_opt()
238 lss.flags |= TCF_CBQ_LSS_ISOLATED; in cbq_parse_class_opt()
239 lss.change |= TCF_CBQ_LSS_FLAGS; in cbq_parse_class_opt()
241 lss.flags &= ~TCF_CBQ_LSS_ISOLATED; in cbq_parse_class_opt()
242 lss.change |= TCF_CBQ_LSS_FLAGS; in cbq_parse_class_opt()
253 lss.change |= TCF_CBQ_LSS_EWMA; in cbq_parse_class_opt()
293 if (get_size(&lss.avpkt, *argv)) { in cbq_parse_class_opt()
297 lss.change |= TCF_CBQ_LSS_AVPKT; 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()
368 lss.ewma_log = ewma_log; in cbq_parse_class_opt()
369 if (lss.change&(TCF_CBQ_LSS_OFFTIME|TCF_CBQ_LSS_MAXIDLE)) { in cbq_parse_class_opt()
370 if (lss.avpkt == 0) { in cbq_parse_class_opt()
383 wrr.allot = (lss.avpkt*3)/2; in cbq_parse_class_opt()
393 if (lss.change&TCF_CBQ_LSS_MAXIDLE) { in cbq_parse_class_opt()
394 lss.maxidle = tc_cbq_calc_maxidle(bndw, r.rate, lss.avpkt, ewma_log, maxburst); in cbq_parse_class_opt()
395 lss.change |= TCF_CBQ_LSS_MAXIDLE; in cbq_parse_class_opt()
396 lss.change |= TCF_CBQ_LSS_EWMA|TCF_CBQ_LSS_AVPKT; in cbq_parse_class_opt()
398 if (lss.change&TCF_CBQ_LSS_OFFTIME) { in cbq_parse_class_opt()
399 lss.offtime = tc_cbq_calc_offtime(bndw, r.rate, lss.avpkt, ewma_log, minburst); in cbq_parse_class_opt()
400 lss.change |= TCF_CBQ_LSS_OFFTIME; in cbq_parse_class_opt()
401 lss.change |= TCF_CBQ_LSS_EWMA|TCF_CBQ_LSS_AVPKT; in cbq_parse_class_opt()
403 if (lss.change&TCF_CBQ_LSS_MINIDLE) { in cbq_parse_class_opt()
404 lss.minidle <<= lss.ewma_log; in cbq_parse_class_opt()
405 lss.change |= TCF_CBQ_LSS_EWMA; in cbq_parse_class_opt()
410 if (lss.change) { in cbq_parse_class_opt()
411 lss.change |= TCF_CBQ_LSS_FLAGS; in cbq_parse_class_opt()
412 addattr_l(n, 1024, TCA_CBQ_LSSOPT, &lss, sizeof(lss)); in cbq_parse_class_opt()
438 struct tc_cbq_lssopt *lss = NULL; in cbq_print_opt() local
459 if (RTA_PAYLOAD(tb[TCA_CBQ_LSSOPT]) < sizeof(*lss)) in cbq_print_opt()
462 lss = RTA_DATA(tb[TCA_CBQ_LSSOPT]); in cbq_print_opt()
501 if (lss && lss->flags) { in cbq_print_opt()
505 if (lss->flags&TCF_CBQ_LSS_BOUNDED) { in cbq_print_opt()
509 if (lss->flags&TCF_CBQ_LSS_ISOLATED) { in cbq_print_opt()
533 if (lss && show_details) { in cbq_print_opt()
534 fprintf(f, "\nlevel %u ewma %u avpkt %ub ", lss->level, lss->ewma_log, lss->avpkt); in cbq_print_opt()
535 if (lss->maxidle) { in cbq_print_opt()
536 fprintf(f, "maxidle %s ", sprint_ticks(lss->maxidle>>lss->ewma_log, b1)); in cbq_print_opt()
538 fprintf(f, "[%08x] ", lss->maxidle); in cbq_print_opt()
540 if (lss->minidle != 0x7fffffff) { in cbq_print_opt()
541 fprintf(f, "minidle %s ", sprint_ticks(lss->minidle>>lss->ewma_log, b1)); in cbq_print_opt()
543 fprintf(f, "[%08x] ", lss->minidle); in cbq_print_opt()
545 if (lss->offtime) { in cbq_print_opt()
546 fprintf(f, "offtime %s ", sprint_ticks(lss->offtime, b1)); in cbq_print_opt()
548 fprintf(f, "[%08x] ", lss->offtime); in cbq_print_opt()