Lines Matching refs:cif

94 	struct codel_if	*cif;
105 cif = malloc(sizeof(struct codel_if), M_DEVBUF, M_NOWAIT | M_ZERO);
106 if (cif == NULL)
108 cif->cif_bandwidth = a->ifbandwidth;
109 cif->cif_ifq = &ifp->if_snd;
111 cif->cl_q = malloc(sizeof(class_queue_t), M_DEVBUF, M_NOWAIT | M_ZERO);
112 if (cif->cl_q == NULL) {
113 free(cif, M_DEVBUF);
119 qlimit(cif->cl_q) = a->qlimit;
120 qtype(cif->cl_q) = Q_CODEL;
121 qlen(cif->cl_q) = 0;
122 qsize(cif->cl_q) = 0;
128 cif->codel.params.target = machclk_freq * opts->target / 1000;
129 cif->codel.params.interval = machclk_freq * opts->interval / 1000;
130 cif->codel.params.ecn = opts->ecn;
131 cif->codel.stats.maxpacket = 256;
133 cif->cl_stats.qlength = qlen(cif->cl_q);
134 cif->cl_stats.qlimit = qlimit(cif->cl_q);
137 a->altq_disc = cif;
145 struct codel_if *cif;
147 if ((cif = a->altq_disc) == NULL)
151 if (cif->cl_q)
152 free(cif->cl_q, M_DEVBUF);
153 free(cif, M_DEVBUF);
161 struct codel_if *cif;
165 if ((cif = altq_lookup(a->ifname, ALTQT_CODEL)) == NULL)
171 stats = cif->cl_stats;
172 stats.stats = cif->codel.stats;
184 struct codel_if *cif = (struct codel_if *)ifq->altq_disc;
191 if (!ALTQ_IS_ENABLED(cif->cif_ifq))
194 if (qempty(cif->cl_q))
197 while ((m = _getq(cif->cl_q)) != NULL) {
198 PKTCNTR_ADD(&cif->cl_stats.cl_dropcnt, m_pktlen(m));
200 IFQ_DEC_LEN(cif->cif_ifq);
202 cif->cif_ifq->ifq_len = 0;
213 struct codel_if *cif = (struct codel_if *) ifq->altq_disc;
223 PKTCNTR_ADD(&cif->cl_stats.cl_dropcnt, m_pktlen(m));
227 if (codel_addq(&cif->codel, cif->cl_q, m)) {
228 PKTCNTR_ADD(&cif->cl_stats.cl_dropcnt, m_pktlen(m));
239 struct codel_if *cif = (struct codel_if *)ifq->altq_disc;
248 return (qhead(cif->cl_q));
251 m = codel_getq(&cif->codel, cif->cl_q);
254 PKTCNTR_ADD(&cif->cl_stats.cl_xmitcnt, m_pktlen(m));