Lines Matching refs:sc
227 hfsc_print_sc(FILE *f, char *name, struct tc_service_curve *sc) in hfsc_print_sc() argument
232 fprintf(f, "m1 %s ", sprint_rate(sc->m1, b1)); in hfsc_print_sc()
233 fprintf(f, "d %s ", sprint_time(tc_core_ktime2time(sc->d), b1)); in hfsc_print_sc()
234 fprintf(f, "m2 %s ", sprint_rate(sc->m2, b1)); in hfsc_print_sc()
293 hfsc_get_sc1(int *argcp, char ***argvp, struct tc_service_curve *sc) in hfsc_get_sc1() argument
326 sc->m1 = m1; in hfsc_get_sc1()
327 sc->d = tc_core_time2ktime(d); in hfsc_get_sc1()
328 sc->m2 = m2; in hfsc_get_sc1()
336 hfsc_get_sc2(int *argcp, char ***argvp, struct tc_service_curve *sc) in hfsc_get_sc2() argument
379 sc->m1 = ceil(1.0 * umax * TIME_UNITS_PER_SEC / dmax); /* in bps */ in hfsc_get_sc2()
380 sc->d = tc_core_time2ktime(dmax); in hfsc_get_sc2()
381 sc->m2 = rate; in hfsc_get_sc2()
387 sc->m1 = 0; in hfsc_get_sc2()
388 sc->d = tc_core_time2ktime(ceil(dmax - umax * TIME_UNITS_PER_SEC / rate)); in hfsc_get_sc2()
389 sc->m2 = rate; in hfsc_get_sc2()
398 hfsc_get_sc(int *argcp, char ***argvp, struct tc_service_curve *sc) in hfsc_get_sc() argument
400 if (hfsc_get_sc1(argcp, argvp, sc) < 0 && in hfsc_get_sc()
401 hfsc_get_sc2(argcp, argvp, sc) < 0) in hfsc_get_sc()
404 if (sc->m1 == 0 && sc->m2 == 0) { in hfsc_get_sc()