Lines Matching refs:bucket

21  * as heavy-hitter, it is immediately switched to the heavy-hitter bucket.
23 * in which the heavy-hitter bucket is served with less weight.
61 * dispatched to the heavy-hitter bucket accordingly.
68 * bucket.
71 * to the non-heavy-hitter bucket.
74 * send p to the heavy-hitter bucket.
105 WDRR_BUCKET_FOR_HH = 0, /* bucket id for heavy-hitters */
106 WDRR_BUCKET_FOR_NON_HH = 1 /* bucket id for non-heavy-hitters */
344 /* Removes one skb from head of bucket. */
345 static struct sk_buff *dequeue_head(struct wdrr_bucket *bucket)
347 struct sk_buff *skb = bucket->head;
349 bucket->head = skb->next;
354 /* Tail-adds skb to bucket. */
355 static void bucket_add(struct wdrr_bucket *bucket, struct sk_buff *skb)
357 if (bucket->head == NULL)
358 bucket->head = skb;
360 bucket->tail->next = skb;
361 bucket->tail = skb;
368 struct wdrr_bucket *bucket;
371 bucket = &q->buckets[WDRR_BUCKET_FOR_HH];
372 if (!bucket->head)
373 bucket = &q->buckets[WDRR_BUCKET_FOR_NON_HH];
375 if (bucket->head) {
376 struct sk_buff *skb = dequeue_head(bucket);
384 /* Return id of the bucket from which the packet was dropped. */
385 return bucket - q->buckets;
392 struct wdrr_bucket *bucket;
396 bucket = &q->buckets[idx];
397 bucket_add(bucket, skb);
400 if (list_empty(&bucket->bucketchain)) {
408 /* Always move heavy-hitters to old bucket. */
410 list_add_tail(&bucket->bucketchain, &q->old_buckets);
413 list_add_tail(&bucket->bucketchain, &q->new_buckets);
415 bucket->deficit = weight * q->quantum;
422 * bucket.
436 struct wdrr_bucket *bucket;
446 bucket = list_first_entry(head, struct wdrr_bucket, bucketchain);
448 if (bucket->deficit <= 0) {
449 int weight = (bucket - q->buckets == WDRR_BUCKET_FOR_HH) ?
452 bucket->deficit += weight * q->quantum;
453 list_move_tail(&bucket->bucketchain, &q->old_buckets);
457 if (bucket->head) {
458 skb = dequeue_head(bucket);
466 list_move_tail(&bucket->bucketchain, &q->old_buckets);
468 list_del_init(&bucket->bucketchain);
472 bucket->deficit -= qdisc_pkt_len(skb);
661 struct wdrr_bucket *bucket = q->buckets + i;
663 INIT_LIST_HEAD(&bucket->bucketchain);