Lines Matching refs:si

155 codel_drop_head(struct fq_codel_flow *q, struct fq_codel_si *si)
163 fq_update_stats(q, si, -m->m_pkthdr.len, 1);
165 if (si->main_q.ni.length == 0) /* queue is now idle */
166 si->main_q.q_time = V_dn_cfg.curr_time;
175 codel_enqueue(struct fq_codel_flow *q, struct mbuf *m, struct fq_codel_si *si)
199 fq_update_stats(q, si, len, 0);
203 fq_update_stats(q, si, len, 1);
215 fq_codel_classify_flow(struct mbuf *m, uint16_t fcount, struct fq_codel_si *si)
232 *((uint32_t *) &tuple[1]) = si->perturbation;
259 *((uint32_t *) &tuple[1]) = si->perturbation;
291 struct fq_codel_si *si;
298 si = (struct fq_codel_si *)_si;
299 schk = (struct fq_codel_schk *)(si->_si.sched+1);
303 idx = fq_codel_classify_flow(m, param->flows_cnt, si);
307 drop = codel_enqueue(&si->flows[idx], m, si);
316 if (!si->flows[idx].active ) {
317 STAILQ_INSERT_TAIL(&si->newflows, &si->flows[idx], flowchain);
318 si->flows[idx].deficit = param->quantum;
319 si->flows[idx].cst.dropping = false;
320 si->flows[idx].cst.first_above_time = 0;
321 si->flows[idx].active = 1;
331 if (si->flows[maxidx].active)
336 if (si->flows[i].active && si->flows[i].stats.length >
337 si->flows[maxidx].stats.length)
339 codel_drop_head(&si->flows[maxidx], si);
355 struct fq_codel_si *si;
362 si = (struct fq_codel_si *)_si;
363 schk = (struct fq_codel_schk *)(si->_si.sched+1);
368 if (STAILQ_EMPTY(&si->newflows))
369 fq_codel_flowlist = &si->oldflows;
371 fq_codel_flowlist = &si->newflows;
387 STAILQ_INSERT_TAIL(&si->oldflows, f, flowchain);
399 mbuf = fqc_codel_dequeue(f, si);
407 if (fq_codel_flowlist == &si->newflows) {
409 STAILQ_INSERT_TAIL(&si->oldflows, f, flowchain);
436 struct fq_codel_si *si;
441 si = (struct fq_codel_si *)_si;
444 if(si->flows) {
445 D("si already configured!");
450 q = &si->main_q;
456 si->flows = mallocarray(schk->cfg.flows_cnt,
458 if (si->flows == NULL) {
463 /* init perturbation for this si */
464 si->perturbation = random();
467 STAILQ_INIT(&si->newflows);
468 STAILQ_INIT(&si->oldflows);
473 si->flows[i].cst.maxpkt_size = 500;
486 struct fq_codel_si *si = (struct fq_codel_si *)_si ;
489 free(si->flows , M_DUMMYNET);
490 si->flows = NULL;