Lines Matching refs:slot

228 	struct sfq_slot *slot = &q->slots[x];  in sfq_link()  local
229 int qlen = slot->qlen; in sfq_link()
234 slot->dep.next = n; in sfq_link()
235 slot->dep.prev = p; in sfq_link()
279 static inline struct sk_buff *slot_dequeue_tail(struct sfq_slot *slot) in slot_dequeue_tail() argument
281 struct sk_buff *skb = slot->skblist_prev; in slot_dequeue_tail()
283 slot->skblist_prev = skb->prev; in slot_dequeue_tail()
284 skb->prev->next = (struct sk_buff *)slot; in slot_dequeue_tail()
290 static inline struct sk_buff *slot_dequeue_head(struct sfq_slot *slot) in slot_dequeue_head() argument
292 struct sk_buff *skb = slot->skblist_next; in slot_dequeue_head()
294 slot->skblist_next = skb->next; in slot_dequeue_head()
295 skb->next->prev = (struct sk_buff *)slot; in slot_dequeue_head()
300 static inline void slot_queue_init(struct sfq_slot *slot) in slot_queue_init() argument
302 memset(slot, 0, sizeof(*slot)); in slot_queue_init()
303 slot->skblist_prev = slot->skblist_next = (struct sk_buff *)slot; in slot_queue_init()
307 static inline void slot_queue_add(struct sfq_slot *slot, struct sk_buff *skb) in slot_queue_add() argument
309 skb->prev = slot->skblist_prev; in slot_queue_add()
310 skb->next = (struct sk_buff *)slot; in slot_queue_add()
311 slot->skblist_prev->next = skb; in slot_queue_add()
312 slot->skblist_prev = skb; in slot_queue_add()
321 struct sfq_slot *slot; in sfq_drop() local
326 slot = &q->slots[x]; in sfq_drop()
328 skb = q->headdrop ? slot_dequeue_head(slot) : slot_dequeue_tail(slot); in sfq_drop()
330 slot->backlog -= len; in sfq_drop()
342 slot = &q->slots[x]; in sfq_drop()
343 q->tail->next = slot->next; in sfq_drop()
344 q->ht[slot->hash] = SFQ_EMPTY_SLOT; in sfq_drop()
374 struct sfq_slot *slot; in sfq_enqueue() local
389 slot = &q->slots[x]; in sfq_enqueue()
395 slot = &q->slots[x]; in sfq_enqueue()
396 slot->hash = hash; in sfq_enqueue()
397 slot->backlog = 0; /* should already be 0 anyway... */ in sfq_enqueue()
398 red_set_vars(&slot->vars); in sfq_enqueue()
402 slot->vars.qavg = red_calc_qavg_no_idle_time(q->red_parms, in sfq_enqueue()
403 &slot->vars, in sfq_enqueue()
404 slot->backlog); in sfq_enqueue()
406 &slot->vars, in sfq_enqueue()
407 slot->vars.qavg)) { in sfq_enqueue()
416 INET_ECN_set_ce(slot->skblist_next)) { in sfq_enqueue()
433 INET_ECN_set_ce(slot->skblist_next)) { in sfq_enqueue()
447 if (slot->qlen >= q->maxdepth) { in sfq_enqueue()
453 head = slot_dequeue_head(slot); in sfq_enqueue()
456 slot->backlog -= delta; in sfq_enqueue()
459 slot_queue_add(slot, skb); in sfq_enqueue()
465 slot->backlog += qdisc_pkt_len(skb); in sfq_enqueue()
466 slot_queue_add(slot, skb); in sfq_enqueue()
468 if (slot->qlen == 1) { /* The flow is new */ in sfq_enqueue()
470 slot->next = x; in sfq_enqueue()
472 slot->next = q->tail->next; in sfq_enqueue()
479 q->tail = slot; in sfq_enqueue()
481 slot->allot = q->scaled_quantum; in sfq_enqueue()
486 qlen = slot->qlen; in sfq_enqueue()
491 if (qlen != slot->qlen) in sfq_enqueue()
505 struct sfq_slot *slot; in sfq_dequeue() local
513 slot = &q->slots[a]; in sfq_dequeue()
514 if (slot->allot <= 0) { in sfq_dequeue()
515 q->tail = slot; in sfq_dequeue()
516 slot->allot += q->scaled_quantum; in sfq_dequeue()
519 skb = slot_dequeue_head(slot); in sfq_dequeue()
524 slot->backlog -= qdisc_pkt_len(skb); in sfq_dequeue()
526 if (slot->qlen == 0) { in sfq_dequeue()
527 q->ht[slot->hash] = SFQ_EMPTY_SLOT; in sfq_dequeue()
528 next_a = slot->next; in sfq_dequeue()
535 slot->allot -= SFQ_ALLOT_SIZE(qdisc_pkt_len(skb)); in sfq_dequeue()
560 struct sfq_slot *slot; in sfq_rehash() local
567 slot = &q->slots[i]; in sfq_rehash()
568 if (!slot->qlen) in sfq_rehash()
570 while (slot->qlen) { in sfq_rehash()
571 skb = slot_dequeue_head(slot); in sfq_rehash()
575 slot->backlog = 0; in sfq_rehash()
576 red_set_vars(&slot->vars); in sfq_rehash()
577 q->ht[slot->hash] = SFQ_EMPTY_SLOT; in sfq_rehash()
585 slot = &q->slots[x]; in sfq_rehash()
596 slot = &q->slots[x]; in sfq_rehash()
597 slot->hash = hash; in sfq_rehash()
599 if (slot->qlen >= q->maxdepth) in sfq_rehash()
601 slot_queue_add(slot, skb); in sfq_rehash()
603 slot->vars.qavg = red_calc_qavg(q->red_parms, in sfq_rehash()
604 &slot->vars, in sfq_rehash()
605 slot->backlog); in sfq_rehash()
606 slot->backlog += qdisc_pkt_len(skb); in sfq_rehash()
608 if (slot->qlen == 1) { /* The flow is new */ in sfq_rehash()
610 slot->next = x; in sfq_rehash()
612 slot->next = q->tail->next; in sfq_rehash()
615 q->tail = slot; in sfq_rehash()
616 slot->allot = q->scaled_quantum; in sfq_rehash()
868 const struct sfq_slot *slot = &q->slots[idx]; in sfq_dump_class_stats() local
870 xstats.allot = slot->allot << SFQ_ALLOT_SHIFT; in sfq_dump_class_stats()
871 qs.qlen = slot->qlen; in sfq_dump_class_stats()
872 qs.backlog = slot->backlog; in sfq_dump_class_stats()