Changeset View
Changeset View
Standalone View
Standalone View
sys/netpfil/ipfw/dn_sched_wf2q.c
Show First 20 Lines • Show All 237 Lines • ▼ Show 20 Lines | while (neh->elements > 0 && | ||||
heap_insert(sch, alg_fq->F, q); | heap_insert(sch, alg_fq->F, q); | ||||
} | } | ||||
if (m) /* pkt found in previous iteration */ | if (m) /* pkt found in previous iteration */ | ||||
break; | break; | ||||
/* ok we have at least one eligible pkt */ | /* ok we have at least one eligible pkt */ | ||||
q = HEAP_TOP(sch)->object; | q = HEAP_TOP(sch)->object; | ||||
alg_fq = (struct wf2qp_queue *)q; | alg_fq = (struct wf2qp_queue *)q; | ||||
m = dn_dequeue(q); | m = dn_dequeue(q); | ||||
if (m == NULL) | |||||
return NULL; | |||||
heap_extract(sch, NULL); /* Remove queue from heap. */ | heap_extract(sch, NULL); /* Remove queue from heap. */ | ||||
si->V += (uint64_t)(m->m_pkthdr.len) * si->inv_wsum; | si->V += (uint64_t)(m->m_pkthdr.len) * si->inv_wsum; | ||||
alg_fq->S = alg_fq->F; /* Update start time. */ | alg_fq->S = alg_fq->F; /* Update start time. */ | ||||
if (q->mq.head == 0) { /* not backlogged any more. */ | if (q->mq.head == 0) { /* not backlogged any more. */ | ||||
heap_insert(&si->idle_heap, alg_fq->F, q); | heap_insert(&si->idle_heap, alg_fq->F, q); | ||||
} else { /* Still backlogged. */ | } else { /* Still backlogged. */ | ||||
/* Update F, store in neh or sch */ | /* Update F, store in neh or sch */ | ||||
uint64_t len = q->mq.head->m_pkthdr.len; | uint64_t len = q->mq.head->m_pkthdr.len; | ||||
▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines |