root_sc.m1 = a->ifbandwidth; root_sc.d = 0; root_sc.m2 = a->ifbandwidth; if ((hif->hif_rootclass = hfsc_class_create(hif, &root_sc, &root_sc, NULL, NULL, 0, 0, 0)) == NULL) { ellist_destroy(hif->hif_eligible); FREE(hif, M_DEVBUF); return (ENOMEM); }
hfsc_add_altq(struct pf_altq *a){	struct hfsc_if *hif;	struct ifnet *ifp;	struct service_curve root_sc;	if ((ifp = ifunit(a->ifname)) == NULL)		return (EINVAL);	if (!ALTQ_IS_READY(&ifp->if_snd))		return (ENODEV);	MALLOC(hif, struct hfsc_if *, sizeof(struct hfsc_if),	    M_DEVBUF, M_WAITOK);	if (hif == NULL)		return (ENOMEM);	bzero(hif, sizeof(struct hfsc_if));	hif->hif_eligible = ellist_alloc();	if (hif->hif_eligible == NULL) {		FREE(hif, M_DEVBUF);		return (ENOMEM);	}	hif->hif_ifq = &ifp->if_snd;	/*	 * create root class	 */	root_sc.m1 = a->ifbandwidth;	root_sc.d = 0;	root_sc.m2 = a->ifbandwidth;	if ((hif->hif_rootclass = hfsc_class_create(hif,	    &root_sc, &root_sc, NULL, NULL, 0, 0, 0)) == NULL) {		ellist_destroy(hif->hif_eligible);		FREE(hif, M_DEVBUF);		return (ENOMEM);	}	/* keep the state in pf_altq */	a->altq_disc = hif;	return (0);}