Home | History | Annotate | Download | only in altq

Lines Matching refs:cl

167 #define	is_a_parent_class(cl)	((cl)->cl_children != NULL)
244 struct hfsc_class *cl, *parent;
275 cl = hfsc_class_create(hif, &rtsc, &lssc, &ulsc,
277 if (cl == NULL)
287 struct hfsc_class *cl;
292 if ((cl = clh_to_clp(hif, a->qid)) == NULL)
295 return (hfsc_class_destroy(cl));
302 struct hfsc_class *cl;
309 if ((cl = clh_to_clp(hif, a->qid)) == NULL)
316 get_class_stats(&stats, cl);
332 struct hfsc_class *cl;
341 (cl = hif->hif_rootclass->cl_children) != NULL) {
346 for (; cl != NULL; cl = hfsc_nextclass(cl)) {
347 if (!is_a_parent_class(cl)) {
348 (void)hfsc_class_destroy(cl);
374 struct hfsc_class *cl;
376 for (cl = hif->hif_rootclass; cl != NULL; cl = hfsc_nextclass(cl))
377 if (!qempty(cl->cl_q))
378 hfsc_purgeq(cl);
388 struct hfsc_class *cl, *p;
403 cl = malloc(sizeof(struct hfsc_class), M_DEVBUF, M_WAITOK|M_ZERO);
404 if (cl == NULL)
407 cl->cl_q = malloc(sizeof(class_queue_t), M_DEVBUF, M_WAITOK|M_ZERO);
408 if (cl->cl_q == NULL)
411 cl->cl_actc = actlist_alloc();
412 if (cl->cl_actc == NULL)
417 qlimit(cl->cl_q) = qlimit;
418 qtype(cl->cl_q) = Q_DROPTAIL;
419 qlen(cl->cl_q) = 0;
420 cl->cl_flags = flags;
447 cl->cl_red = red_alloc(0, 0,
448 qlimit(cl->cl_q) * 10/100,
449 qlimit(cl->cl_q) * 30/100,
451 if (cl->cl_red != NULL)
452 qtype(cl->cl_q) = Q_RED;
456 cl->cl_red = (red_t *)rio_alloc(0, NULL,
458 if (cl->cl_red != NULL)
459 qtype(cl->cl_q) = Q_RIO;
466 cl->cl_rsc = malloc(sizeof(struct internal_sc), M_DEVBUF,
468 if (cl->cl_rsc == NULL)
470 sc2isc(rsc, cl->cl_rsc);
471 rtsc_init(&cl->cl_deadline, cl->cl_rsc, 0, 0);
472 rtsc_init(&cl->cl_eligible, cl->cl_rsc, 0, 0);
475 cl->cl_fsc = malloc(sizeof(struct internal_sc), M_DEVBUF,
477 if (cl->cl_fsc == NULL)
479 sc2isc(fsc, cl->cl_fsc);
480 rtsc_init(&cl->cl_virtual, cl->cl_fsc, 0, 0);
483 cl->cl_usc = malloc(sizeof(struct internal_sc), M_DEVBUF,
485 if (cl->cl_usc == NULL)
487 sc2isc(usc, cl->cl_usc);
488 rtsc_init(&cl->cl_ulimit, cl->cl_usc, 0, 0);
491 cl->cl_id = hif->hif_classid++;
492 cl->cl_handle = qid;
493 cl->cl_hif = hif;
494 cl->cl_parent = parent;
506 hif->hif_class_tbl[i] = cl;
510 hif->hif_class_tbl[i] = cl;
520 hif->hif_defaultclass = cl;
524 hif->hif_rootclass = cl;
528 parent->cl_children = cl;
532 p->cl_siblings = cl;
537 return cl;
540 if (cl->cl_actc != NULL)
541 actlist_destroy(cl->cl_actc);
542 if (cl->cl_red != NULL) {
544 if (q_is_rio(cl->cl_q))
545 rio_destroy((rio_t *)cl->cl_red);
548 if (q_is_red(cl->cl_q))
549 red_destroy(cl->cl_red);
552 if (cl->cl_fsc != NULL)
553 free(cl->cl_fsc, M_DEVBUF);
554 if (cl->cl_rsc != NULL)
555 free(cl->cl_rsc, M_DEVBUF);
556 if (cl->cl_usc != NULL)
557 free(cl->cl_usc, M_DEVBUF);
558 if (cl->cl_q != NULL)
559 free(cl->cl_q, M_DEVBUF);
560 free(cl, M_DEVBUF);
565 hfsc_class_destroy(struct hfsc_class *cl)
569 if (cl == NULL)
572 if (is_a_parent_class(cl))
579 acc_discard_filters(&cl->cl_hif->hif_classifier, cl, 0);
582 if (!qempty(cl->cl_q))
583 hfsc_purgeq(cl);
585 if (cl->cl_parent == NULL) {
588 struct hfsc_class *p = cl->cl_parent->cl_children;
590 if (p == cl)
591 cl->cl_parent->cl_children = cl->cl_siblings;
593 if (p->cl_siblings == cl) {
594 p->cl_siblings = cl->cl_siblings;
602 if (cl->cl_hif->hif_class_tbl[i] == cl) {
603 cl->cl_hif->hif_class_tbl[i] = NULL;
607 cl->cl_hif->hif_classes--;
610 actlist_destroy(cl->cl_actc);
612 if (cl->cl_red != NULL) {
614 if (q_is_rio(cl->cl_q))
615 rio_destroy((rio_t *)cl->cl_red);
618 if (q_is_red(cl->cl_q))
619 red_destroy(cl->cl_red);
623 if (cl == cl->cl_hif->hif_rootclass)
624 cl->cl_hif->hif_rootclass = NULL;
625 if (cl == cl->cl_hif->hif_defaultclass)
626 cl->cl_hif->hif_defaultclass = NULL;
628 if (cl->cl_usc != NULL)
629 free(cl->cl_usc, M_DEVBUF);
630 if (cl->cl_fsc != NULL)
631 free(cl->cl_fsc, M_DEVBUF);
632 if (cl->cl_rsc != NULL)
633 free(cl->cl_rsc, M_DEVBUF);
634 free(cl->cl_q, M_DEVBUF);
635 free(cl, M_DEVBUF);
643 * for (cl = hif->hif_rootclass; cl != NULL; cl = hfsc_nextclass(cl))
647 hfsc_nextclass(struct hfsc_class *cl)
649 if (cl->cl_children != NULL)
650 cl = cl->cl_children;
651 else if (cl->cl_siblings != NULL)
652 cl = cl->cl_siblings;
654 while ((cl = cl->cl_parent) != NULL)
655 if (cl->cl_siblings) {
656 cl = cl->cl_siblings;
661 return cl;
673 struct hfsc_class *cl;
685 cl = NULL;
687 cl = clh_to_clp(hif, ((struct altq_tag *)(t+1))->qid);
690 cl = m->m_pkthdr.pattr_class;
692 if (cl == NULL || is_a_parent_class(cl)) {
693 cl = hif->hif_defaultclass;
694 if (cl == NULL) {
705 cl->cl_pktattr = &pktattr; /* save proto hdr used by ECN */
708 cl->cl_pktattr = NULL;
710 if (hfsc_addq(cl, m) != 0) {
712 PKTCNTR_ADD(&cl->cl_stats.drop_cnt, len);
716 cl->cl_hif->hif_packets++;
719 if (qlen(cl->cl_q) == 1)
720 set_active(cl, m_pktlen(m));
738 struct hfsc_class *cl;
752 cl = hif->hif_pollcache;
755 if (cl->cl_rsc != NULL)
756 realtime = (cl->cl_e <= cur_time);
763 if ((cl = ellist_get_mindl(hif->hif_eligible, cur_time))
774 cl = hif->hif_rootclass;
775 while (is_a_parent_class(cl)) {
777 cl = actlist_firstfit(cl, cur_time);
778 if (cl == NULL) {
789 if (cl->cl_parent->cl_cvtmin < cl->cl_vt)
790 cl->cl_parent->cl_cvtmin = cl->cl_vt;
798 hif->hif_pollcache = cl;
799 m = hfsc_pollq(cl);
804 m = hfsc_getq(cl);
808 cl->cl_hif->hif_packets--;
810 PKTCNTR_ADD(&cl->cl_stats.xmit_cnt, len);
812 update_vf(cl, len, cur_time);
814 cl->cl_cumul += len;
816 if (!qempty(cl->cl_q)) {
817 if (cl->cl_rsc != NULL) {
819 next_len = m_pktlen(qhead(cl->cl_q));
822 update_ed(cl, next_len);
824 update_d(cl, next_len);
828 set_passive(cl);
835 hfsc_addq(struct hfsc_class *cl, struct mbuf *m)
839 if (q_is_rio(cl->cl_q))
840 return rio_addq((rio_t *)cl->cl_red, cl->cl_q,
841 m, cl->cl_pktattr);
844 if (q_is_red(cl->cl_q))
845 return red_addq(cl->cl_red, cl->cl_q, m, cl->cl_pktattr);
847 if (qlen(cl->cl_q) >= qlimit(cl->cl_q)) {
852 if (cl->cl_flags & HFCF_CLEARDSCP)
853 write_dsfield(m, cl->cl_pktattr, 0);
855 _addq(cl->cl_q, m);
861 hfsc_getq(struct hfsc_class *cl)
864 if (q_is_rio(cl->cl_q))
865 return rio_getq((rio_t *)cl->cl_red, cl->cl_q);
868 if (q_is_red(cl->cl_q))
869 return red_getq(cl->cl_red, cl->cl_q);
871 return _getq(cl->cl_q);
875 hfsc_pollq(struct hfsc_class *cl)
877 return qhead(cl->cl_q);
881 hfsc_purgeq(struct hfsc_class *cl)
885 if (qempty(cl->cl_q))
888 while ((m = _getq(cl->cl_q)) != NULL) {
889 PKTCNTR_ADD(&cl->cl_stats.drop_cnt, m_pktlen(m));
891 cl->cl_hif->hif_packets--;
892 IFQ_DEC_LEN(cl->cl_hif->hif_ifq);
894 ASSERT(qlen(cl->cl_q) == 0);
896 update_vf(cl, 0, 0); /* remove cl from the actlist */
897 set_passive(cl);
901 set_active(struct hfsc_class *cl, int len)
903 if (cl->cl_rsc != NULL)
904 init_ed(cl, len);
905 if (cl->cl_fsc != NULL)
906 init_vf(cl, len);
908 cl->cl_stats.period++;
912 set_passive(struct hfsc_class *cl)
914 if (cl->cl_rsc != NULL)
915 ellist_remove(cl);
918 * actlist is now handled in update_vf() so that update_vf(cl, 0, 0)
924 init_ed(struct hfsc_class *cl, int next_len)
931 rtsc_min(&cl->cl_deadline, cl->cl_rsc, cur_time, cl->cl_cumul);
938 cl->cl_eligible = cl->cl_deadline;
939 if (cl->cl_rsc->sm1 <= cl->cl_rsc->sm2) {
940 cl->cl_eligible.dx = 0;
941 cl->cl_eligible.dy = 0;
945 cl->cl_e = rtsc_y2x(&cl->cl_eligible, cl->cl_cumul);
946 cl->cl_d = rtsc_y2x(&cl->cl_deadline, cl->cl_cumul + next_len);
948 ellist_insert(cl);
952 update_ed(struct hfsc_class *cl, int next_len)
954 cl->cl_e = rtsc_y2x(&cl->cl_eligible, cl->cl_cumul);
955 cl->cl_d = rtsc_y2x(&cl->cl_deadline, cl->cl_cumul + next_len);
957 ellist_update(cl);
961 update_d(struct hfsc_class *cl, int next_len)
963 cl->cl_d = rtsc_y2x(&cl->cl_deadline, cl->cl_cumul + next_len);
967 init_vf(struct hfsc_class *cl, int len)
975 for ( ; cl->cl_parent != NULL; cl = cl->cl_parent) {
977 if (go_active && cl->cl_nactive++ == 0)
983 max_cl = actlist_last(cl->cl_parent->cl_actc);
991 if (cl->cl_parent->cl_cvtmin != 0)
992 vt = (cl->cl_parent->cl_cvtmin + vt)/2;
994 if (cl->cl_parent->cl_vtperiod !=
995 cl->cl_parentperiod || vt > cl->cl_vt)
996 cl->cl_vt = vt;
1004 vt = cl->cl_parent->cl_cvtmax;
1005 for (p = cl->cl_parent->cl_children; p != NULL;
1008 cl->cl_vt = 0;
1009 cl->cl_parent->cl_cvtmax = 0;
1010 cl->cl_parent->cl_cvtmin = 0;
1012 cl->cl_initvt = cl->cl_vt;
1015 vt = cl->cl_vt + cl->cl_vtoff;
1016 rtsc_min(&cl->cl_virtual, cl->cl_fsc, vt, cl->cl_total);
1017 if (cl->cl_virtual.x == vt) {
1018 cl->cl_virtual.x -= cl->cl_vtoff;
1019 cl->cl_vtoff = 0;
1021 cl->cl_vtadj = 0;
1023 cl->cl_vtperiod++; /* increment vt period */
1024 cl->cl_parentperiod = cl->cl_parent->cl_vtperiod;
1025 if (cl->cl_parent->cl_nactive == 0)
1026 cl->cl_parentperiod++;
1027 cl->cl_f = 0;
1029 actlist_insert(cl);
1031 if (cl->cl_usc != NULL) {
1037 rtsc_min(&cl->cl_ulimit, cl->cl_usc, cur_time,
1038 cl->cl_total);
1040 cl->cl_myf = rtsc_y2x(&cl->cl_ulimit,
1041 cl->cl_total);
1042 cl->cl_myfadj = 0;
1046 if (cl->cl_myf > cl->cl_cfmin)
1047 f = cl->cl_myf;
1049 f = cl->cl_cfmin;
1050 if (f != cl->cl_f) {
1051 cl->cl_f = f;
1052 update_cfmin(cl->cl_parent);
1058 update_vf(struct hfsc_class *cl, int len, u_int64_t cur_time)
1063 go_passive = qempty(cl->cl_q);
1065 for (; cl->cl_parent != NULL; cl = cl->cl_parent) {
1067 cl->cl_total += len;
1069 if (cl->cl_fsc == NULL || cl->cl_nactive == 0)
1072 if (go_passive && --cl->cl_nactive == 0)
1081 if (cl->cl_vt > cl->cl_parent->cl_cvtmax)
1082 cl->cl_parent->cl_cvtmax = cl->cl_vt;
1085 actlist_remove(cl);
1087 update_cfmin(cl->cl_parent);
1095 cl->cl_vt = rtsc_y2x(&cl->cl_virtual, cl->cl_total)
1096 - cl->cl_vtoff + cl->cl_vtadj;
1103 if (cl->cl_vt < cl->cl_parent->cl_cvtmin) {
1104 cl->cl_vtadj += cl->cl_parent->cl_cvtmin - cl->cl_vt;
1105 cl->cl_vt = cl->cl_parent->cl_cvtmin;
1109 actlist_update(cl);
1111 if (cl->cl_usc != NULL) {
1112 cl->cl_myf = cl->cl_myfadj
1113 + rtsc_y2x(&cl->cl_ulimit, cl->cl_total);
1123 if (cl->cl_myf < myf_bound) {
1124 delta = cur_time - cl->cl_myf;
1125 cl->cl_myfadj += delta;
1126 cl->cl_myf += delta;
1131 if (cl->cl_myf > cl->cl_cfmin)
1132 f = cl->cl_myf;
1134 f = cl->cl_cfmin;
1135 if (f != cl->cl_f) {
1136 cl->cl_f = f;
1137 update_cfmin(cl->cl_parent);
1143 update_cfmin(struct hfsc_class *cl)
1148 if (TAILQ_EMPTY(cl->cl_actc)) {
1149 cl->cl_cfmin = 0;
1153 TAILQ_FOREACH(p, cl->cl_actc, cl_actlist) {
1155 cl->cl_cfmin = 0;
1161 cl->cl_cfmin = cfmin;
1190 ellist_insert(struct hfsc_class *cl)
1192 struct hfsc_if *hif = cl->cl_hif;
1197 p->cl_e <= cl->cl_e) {
1198 TAILQ_INSERT_TAIL(hif->hif_eligible, cl, cl_ellist);
1203 if (cl->cl_e < p->cl_e) {
1204 TAILQ_INSERT_BEFORE(p, cl, cl_ellist);
1212 ellist_remove(struct hfsc_class *cl)
1214 struct hfsc_if *hif = cl->cl_hif;
1216 TAILQ_REMOVE(hif->hif_eligible, cl, cl_ellist);
1220 ellist_update(struct hfsc_class *cl)
1222 struct hfsc_if *hif = cl->cl_hif;
1229 p = TAILQ_NEXT(cl, cl_ellist);
1230 if (p == NULL || cl->cl_e <= p->cl_e)
1236 if (last->cl_e <= cl->cl_e) {
1237 TAILQ_REMOVE(hif->hif_eligible, cl, cl_ellist);
1238 TAILQ_INSERT_TAIL(hif->hif_eligible, cl, cl_ellist);
1247 if (cl->cl_e < p->cl_e) {
1248 TAILQ_REMOVE(hif->hif_eligible, cl, cl_ellist);
1249 TAILQ_INSERT_BEFORE(p, cl, cl_ellist);
1260 struct hfsc_class *p, *cl = NULL;
1265 if (cl == NULL || p->cl_d < cl->cl_d)
1266 cl = p;
1268 return cl;
1292 actlist_insert(struct hfsc_class *cl)
1297 if ((p = TAILQ_LAST(cl->cl_parent->cl_actc, _active)) == NULL
1298 || p->cl_vt <= cl->cl_vt) {
1299 TAILQ_INSERT_TAIL(cl->cl_parent->cl_actc, cl, cl_actlist);
1303 TAILQ_FOREACH(p, cl->cl_parent->cl_actc, cl_actlist) {
1304 if (cl->cl_vt < p->cl_vt) {
1305 TAILQ_INSERT_BEFORE(p, cl, cl_actlist);
1313 actlist_remove(struct hfsc_class *cl)
1315 TAILQ_REMOVE(cl->cl_parent->cl_actc, cl, cl_actlist);
1319 actlist_update(struct hfsc_class *cl)
1328 p = TAILQ_NEXT(cl, cl_actlist);
1329 if (p == NULL || cl->cl_vt < p->cl_vt)
1333 last = TAILQ_LAST(cl->cl_parent->cl_actc, _active);
1335 if (last->cl_vt <= cl->cl_vt) {
1336 TAILQ_REMOVE(cl->cl_parent->cl_actc, cl, cl_actlist);
1337 TAILQ_INSERT_TAIL(cl->cl_parent->cl_actc, cl, cl_actlist);
1346 if (cl->cl_vt < p->cl_vt) {
1347 TAILQ_REMOVE(cl->cl_parent->cl_actc, cl, cl_actlist);
1348 TAILQ_INSERT_BEFORE(p, cl, cl_actlist);
1356 actlist_firstfit(struct hfsc_class *cl, u_int64_t cur_time)
1360 TAILQ_FOREACH(p, cl->cl_actc, cl_actlist) {
1614 get_class_stats(struct hfsc_classstats *sp, struct hfsc_class *cl)
1616 sp->class_id = cl->cl_id;
1617 sp->class_handle = cl->cl_handle;
1619 if (cl->cl_rsc != NULL) {
1620 sp->rsc.m1 = sm2m(cl->cl_rsc->sm1);
1621 sp->rsc.d = dx2d(cl->cl_rsc->dx);
1622 sp->rsc.m2 = sm2m(cl->cl_rsc->sm2);
1628 if (cl->cl_fsc != NULL) {
1629 sp->fsc.m1 = sm2m(cl->cl_fsc->sm1);
1630 sp->fsc.d = dx2d(cl->cl_fsc->dx);
1631 sp->fsc.m2 = sm2m(cl->cl_fsc->sm2);
1637 if (cl->cl_usc != NULL) {
1638 sp->usc.m1 = sm2m(cl->cl_usc->sm1);
1639 sp->usc.d = dx2d(cl->cl_usc->dx);
1640 sp->usc.m2 = sm2m(cl->cl_usc->sm2);
1647 sp->total = cl->cl_total;
1648 sp->cumul = cl->cl_cumul;
1650 sp->d = cl->cl_d;
1651 sp->e = cl->cl_e;
1652 sp->vt = cl->cl_vt;
1653 sp->f = cl->cl_f;
1655 sp->initvt = cl->cl_initvt;
1656 sp->vtperiod = cl->cl_vtperiod;
1657 sp->parentperiod = cl->cl_parentperiod;
1658 sp->nactive = cl->cl_nactive;
1659 sp->vtoff = cl->cl_vtoff;
1660 sp->cvtmax = cl->cl_cvtmax;
1661 sp->myf = cl->cl_myf;
1662 sp->cfmin = cl->cl_cfmin;
1663 sp->cvtmin = cl->cl_cvtmin;
1664 sp->myfadj = cl->cl_myfadj;
1665 sp->vtadj = cl->cl_vtadj;
1670 sp->qlength = qlen(cl->cl_q);
1671 sp->qlimit = qlimit(cl->cl_q);
1672 sp->xmit_cnt = cl->cl_stats.xmit_cnt;
1673 sp->drop_cnt = cl->cl_stats.drop_cnt;
1674 sp->period = cl->cl_stats.period;
1676 sp->qtype = qtype(cl->cl_q);
1678 if (q_is_red(cl->cl_q))
1679 red_getstats(cl->cl_red, &sp->red[0]);
1682 if (q_is_rio(cl->cl_q))
1683 rio_getstats((rio_t *)cl->cl_red, &sp->red[0]);
1692 struct hfsc_class *cl;
1701 if ((cl = hif->hif_class_tbl[i]) != NULL && cl->cl_handle == chandle)
1702 return cl;
1704 if ((cl = hif->hif_class_tbl[i]) != NULL &&
1705 cl->cl_handle == chandle)
1706 return cl;
1761 hfsc_class_modify(struct hfsc_class *cl, struct service_curve *rsc,
1770 cl->cl_rsc == NULL) {
1777 cl->cl_fsc == NULL) {
1784 cl->cl_usc == NULL) {
1796 if (cl->cl_rsc != NULL) {
1797 if (!qempty(cl->cl_q))
1798 hfsc_purgeq(cl);
1799 free(cl->cl_rsc, M_DEVBUF);
1800 cl->cl_rsc = NULL;
1803 if (cl->cl_rsc == NULL)
1804 cl->cl_rsc = rsc_tmp;
1805 sc2isc(rsc, cl->cl_rsc);
1806 rtsc_init(&cl->cl_deadline, cl->cl_rsc, cur_time,
1807 cl->cl_cumul);
1808 cl->cl_eligible = cl->cl_deadline;
1809 if (cl->cl_rsc->sm1 <= cl->cl_rsc->sm2) {
1810 cl->cl_eligible.dx = 0;
1811 cl->cl_eligible.dy = 0;
1818 if (cl->cl_fsc != NULL) {
1819 if (!qempty(cl->cl_q))
1820 hfsc_purgeq(cl);
1821 free(cl->cl_fsc, M_DEVBUF);
1822 cl->cl_fsc = NULL;
1825 if (cl->cl_fsc == NULL)
1826 cl->cl_fsc = fsc_tmp;
1827 sc2isc(fsc, cl->cl_fsc);
1828 rtsc_init(&cl->cl_virtual, cl->cl_fsc, cl->cl_vt,
1829 cl->cl_total);
1835 if (cl->cl_usc != NULL) {
1836 free(cl->cl_usc, M_DEVBUF);
1837 cl->cl_usc = NULL;
1838 cl->cl_myf = 0;
1841 if (cl->cl_usc == NULL)
1842 cl->cl_usc = usc_tmp;
1843 sc2isc(usc, cl->cl_usc);
1844 rtsc_init(&cl->cl_ulimit, cl->cl_usc, cur_time,
1845 cl->cl_total);
1849 if (!qempty(cl->cl_q)) {
1850 if (cl->cl_rsc != NULL)
1851 update_ed(cl, m_pktlen(qhead(cl->cl_q)));
1852 if (cl->cl_fsc != NULL)
1853 update_vf(cl, 0, cur_time);
2047 struct hfsc_class *cl, *parent;
2066 if ((cl = hfsc_class_create(hif, &ap->service_curve, NULL, NULL,
2080 struct hfsc_class *cl;
2085 if ((cl = clh_to_clp(hif, ap->class_handle)) == NULL)
2088 return hfsc_class_destroy(cl);
2095 struct hfsc_class *cl;
2103 if ((cl = clh_to_clp(hif, ap->class_handle)) == NULL)
2113 return hfsc_class_modify(cl, rsc, fsc, usc);
2120 struct hfsc_class *cl;
2125 if ((cl = clh_to_clp(hif, ap->class_handle)) == NULL)
2128 if (is_a_parent_class(cl)) {
2136 cl, &ap->filter_handle);
2155 struct hfsc_class *cl;
2169 for (cl = hif->hif_rootclass, n = 0; cl != NULL && n < nclasses;
2170 cl = hfsc_nextclass(cl), n++)
2178 for (n = 0; cl != NULL && n < nclasses; cl = hfsc_nextclass(cl), n++) {
2181 get_class_stats(&stats, cl);