Lines Matching refs:slot
205 struct sfq_slot *slot = &q->slots[x]; in sfq_link() local
206 int qlen = slot->qlen; in sfq_link()
211 slot->dep.next = n; in sfq_link()
212 slot->dep.prev = p; in sfq_link()
256 static inline struct sk_buff *slot_dequeue_tail(struct sfq_slot *slot) in slot_dequeue_tail() argument
258 struct sk_buff *skb = slot->skblist_prev; in slot_dequeue_tail()
260 slot->skblist_prev = skb->prev; in slot_dequeue_tail()
261 skb->prev->next = (struct sk_buff *)slot; in slot_dequeue_tail()
267 static inline struct sk_buff *slot_dequeue_head(struct sfq_slot *slot) in slot_dequeue_head() argument
269 struct sk_buff *skb = slot->skblist_next; in slot_dequeue_head()
271 slot->skblist_next = skb->next; in slot_dequeue_head()
272 skb->next->prev = (struct sk_buff *)slot; in slot_dequeue_head()
277 static inline void slot_queue_init(struct sfq_slot *slot) in slot_queue_init() argument
279 memset(slot, 0, sizeof(*slot)); in slot_queue_init()
280 slot->skblist_prev = slot->skblist_next = (struct sk_buff *)slot; in slot_queue_init()
284 static inline void slot_queue_add(struct sfq_slot *slot, struct sk_buff *skb) in slot_queue_add() argument
286 skb->prev = slot->skblist_prev; in slot_queue_add()
287 skb->next = (struct sk_buff *)slot; in slot_queue_add()
288 slot->skblist_prev->next = skb; in slot_queue_add()
289 slot->skblist_prev = skb; in slot_queue_add()
298 struct sfq_slot *slot; in sfq_drop() local
303 slot = &q->slots[x]; in sfq_drop()
305 skb = q->headdrop ? slot_dequeue_head(slot) : slot_dequeue_tail(slot); in sfq_drop()
307 slot->backlog -= len; in sfq_drop()
319 slot = &q->slots[x]; in sfq_drop()
320 q->tail->next = slot->next; in sfq_drop()
321 q->ht[slot->hash] = SFQ_EMPTY_SLOT; in sfq_drop()
351 struct sfq_slot *slot; in sfq_enqueue() local
366 slot = &q->slots[x]; in sfq_enqueue()
372 slot = &q->slots[x]; in sfq_enqueue()
373 slot->hash = hash; in sfq_enqueue()
374 slot->backlog = 0; /* should already be 0 anyway... */ in sfq_enqueue()
375 red_set_vars(&slot->vars); in sfq_enqueue()
379 slot->vars.qavg = red_calc_qavg_no_idle_time(q->red_parms, in sfq_enqueue()
380 &slot->vars, in sfq_enqueue()
381 slot->backlog); in sfq_enqueue()
383 &slot->vars, in sfq_enqueue()
384 slot->vars.qavg)) { in sfq_enqueue()
393 INET_ECN_set_ce(slot->skblist_next)) { in sfq_enqueue()
410 INET_ECN_set_ce(slot->skblist_next)) { in sfq_enqueue()
424 if (slot->qlen >= q->maxdepth) { in sfq_enqueue()
430 head = slot_dequeue_head(slot); in sfq_enqueue()
433 slot->backlog -= delta; in sfq_enqueue()
436 slot_queue_add(slot, skb); in sfq_enqueue()
442 slot->backlog += qdisc_pkt_len(skb); in sfq_enqueue()
443 slot_queue_add(slot, skb); in sfq_enqueue()
445 if (slot->qlen == 1) { /* The flow is new */ in sfq_enqueue()
447 slot->next = x; in sfq_enqueue()
449 slot->next = q->tail->next; in sfq_enqueue()
456 q->tail = slot; in sfq_enqueue()
458 slot->allot = q->scaled_quantum; in sfq_enqueue()
463 qlen = slot->qlen; in sfq_enqueue()
468 if (qlen != slot->qlen) in sfq_enqueue()
482 struct sfq_slot *slot; in sfq_dequeue() local
490 slot = &q->slots[a]; in sfq_dequeue()
491 if (slot->allot <= 0) { in sfq_dequeue()
492 q->tail = slot; in sfq_dequeue()
493 slot->allot += q->scaled_quantum; in sfq_dequeue()
496 skb = slot_dequeue_head(slot); in sfq_dequeue()
501 slot->backlog -= qdisc_pkt_len(skb); in sfq_dequeue()
503 if (slot->qlen == 0) { in sfq_dequeue()
504 q->ht[slot->hash] = SFQ_EMPTY_SLOT; in sfq_dequeue()
505 next_a = slot->next; in sfq_dequeue()
512 slot->allot -= SFQ_ALLOT_SIZE(qdisc_pkt_len(skb)); in sfq_dequeue()
537 struct sfq_slot *slot; in sfq_rehash() local
545 slot = &q->slots[i]; in sfq_rehash()
546 if (!slot->qlen) in sfq_rehash()
548 while (slot->qlen) { in sfq_rehash()
549 skb = slot_dequeue_head(slot); in sfq_rehash()
553 slot->backlog = 0; in sfq_rehash()
554 red_set_vars(&slot->vars); in sfq_rehash()
555 q->ht[slot->hash] = SFQ_EMPTY_SLOT; in sfq_rehash()
563 slot = &q->slots[x]; in sfq_rehash()
575 slot = &q->slots[x]; in sfq_rehash()
576 slot->hash = hash; in sfq_rehash()
578 if (slot->qlen >= q->maxdepth) in sfq_rehash()
580 slot_queue_add(slot, skb); in sfq_rehash()
582 slot->vars.qavg = red_calc_qavg(q->red_parms, in sfq_rehash()
583 &slot->vars, in sfq_rehash()
584 slot->backlog); in sfq_rehash()
585 slot->backlog += qdisc_pkt_len(skb); in sfq_rehash()
587 if (slot->qlen == 1) { /* The flow is new */ in sfq_rehash()
589 slot->next = x; in sfq_rehash()
591 slot->next = q->tail->next; in sfq_rehash()
594 q->tail = slot; in sfq_rehash()
595 slot->allot = q->scaled_quantum; in sfq_rehash()
847 const struct sfq_slot *slot = &q->slots[idx]; in sfq_dump_class_stats() local
849 xstats.allot = slot->allot << SFQ_ALLOT_SHIFT; in sfq_dump_class_stats()
850 qs.qlen = slot->qlen; in sfq_dump_class_stats()
851 qs.backlog = slot->backlog; in sfq_dump_class_stats()