Lines Matching defs:altq

127 #include <net/altq/altq.h>
128 #include <net/altq/altq_cbq.h>
489 PE_parse_boot_argn("altq", &altq_allowed, sizeof (altq_allowed));
957 struct pf_altq *altq;
962 /* Purge the old altq list */
963 while ((altq = TAILQ_FIRST(pf_altqs_inactive)) != NULL) {
964 TAILQ_REMOVE(pf_altqs_inactive, altq, entries);
965 if (altq->qname[0] == '\0') {
967 error = altq_remove(altq);
969 pf_qid_unref(altq->qid);
970 pool_put(&pf_altq_pl, altq);
982 struct pf_altq *altq;
989 /* Purge the old altq list */
990 while ((altq = TAILQ_FIRST(pf_altqs_inactive)) != NULL) {
991 TAILQ_REMOVE(pf_altqs_inactive, altq, entries);
992 if (altq->qname[0] == '\0') {
994 error = altq_remove(altq);
996 pf_qid_unref(altq->qid);
997 pool_put(&pf_altq_pl, altq);
1007 struct pf_altq *altq;
1022 TAILQ_FOREACH(altq, pf_altqs_active, entries) {
1023 if (altq->qname[0] == '\0') {
1025 error = altq_pfattach(altq);
1027 error = pf_enable_altq(altq);
1034 /* Purge the old altq list */
1035 while ((altq = TAILQ_FIRST(pf_altqs_inactive)) != NULL) {
1036 TAILQ_REMOVE(pf_altqs_inactive, altq, entries);
1037 if (altq->qname[0] == '\0') {
1040 error = pf_disable_altq(altq);
1041 err = altq_pfdetach(altq);
1044 err = altq_remove(altq);
1048 pf_qid_unref(altq->qid);
1049 pool_put(&pf_altq_pl, altq);
1057 pf_enable_altq(struct pf_altq *altq)
1065 if ((ifp = ifunit(altq->ifname)) == NULL)
1077 if (altq->aflags & PF_ALTQF_TBR) {
1078 if (altq->bwtype != PF_ALTQ_BW_ABSOLUTE &&
1079 altq->bwtype != PF_ALTQ_BW_PERCENT) {
1082 if (altq->bwtype == PF_ALTQ_BW_ABSOLUTE)
1083 tb.rate = altq->ifbandwidth;
1085 tb.percent = altq->ifbandwidth;
1086 tb.depth = altq->tbrsize;
1099 pf_disable_altq(struct pf_altq *altq)
1107 if ((ifp = ifunit(altq->ifname)) == NULL)
1116 if (altq->altq_disc != IFCQ_ALTQ(ifq)->altq_disc) {
1991 struct pf_altq *altq;
1994 /* enable all altq interfaces on active list */
1995 TAILQ_FOREACH(altq, pf_altqs_active, entries) {
1996 if (altq->qname[0] == '\0') {
1997 error = pf_enable_altq(altq);
2004 DPFPRINTF(PF_DEBUG_MISC, ("altq: started\n"));
2009 struct pf_altq *altq;
2012 /* disable all altq interfaces on active list */
2013 TAILQ_FOREACH(altq, pf_altqs_active, entries) {
2014 if (altq->qname[0] == '\0') {
2015 error = pf_disable_altq(altq);
2022 DPFPRINTF(PF_DEBUG_MISC, ("altq: stopped\n"));
2028 struct pf_altq *altq, *a;
2037 altq = pool_get(&pf_altq_pl, PR_WAITOK);
2038 if (altq == NULL) {
2042 pf_altq_copyin(&pa->altq, altq);
2048 if (altq->qname[0] != '\0') {
2049 if ((altq->qid = pf_qname2qid(altq->qname)) == 0) {
2051 pool_put(&pf_altq_pl, altq);
2054 altq->altq_disc = NULL;
2056 if (strncmp(a->ifname, altq->ifname,
2058 altq->altq_disc = a->altq_disc;
2064 error = altq_add(altq);
2066 pool_put(&pf_altq_pl, altq);
2070 TAILQ_INSERT_TAIL(pf_altqs_inactive, altq, entries);
2071 pf_altq_copyout(altq, &pa->altq);
2077 struct pf_altq *altq;
2082 TAILQ_FOREACH(altq, pf_altqs_active, entries)
2091 struct pf_altq *altq;
2102 altq = TAILQ_FIRST(pf_altqs_active);
2103 while ((altq != NULL) && (nr < pa_nr)) {
2104 altq = TAILQ_NEXT(altq, entries);
2107 if (altq == NULL) {
2111 pf_altq_copyout(altq, &pa->altq);
2123 struct pf_altq *altq;
2135 altq = TAILQ_FIRST(pf_altqs_active);
2136 while ((altq != NULL) && (nr < pq_nr)) {
2137 altq = TAILQ_NEXT(altq, entries);
2140 if (altq == NULL) {
2145 error = altq_getqstats(altq, pq->buf, &nbytes);
2147 pq->scheduler = altq->scheduler;