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 */
328 /* Removes one skb from head of bucket. */
329 static struct sk_buff *dequeue_head(struct wdrr_bucket *bucket)
331 struct sk_buff *skb = bucket->head;
333 bucket->head = skb->next;
338 /* Tail-adds skb to bucket. */
339 static void bucket_add(struct wdrr_bucket *bucket, struct sk_buff *skb)
341 if (bucket->head == NULL)
342 bucket->head = skb;
344 bucket->tail->next = skb;
345 bucket->tail = skb;
352 struct wdrr_bucket *bucket;
355 bucket = &q->buckets[WDRR_BUCKET_FOR_HH];
356 if (!bucket->head)
357 bucket = &q->buckets[WDRR_BUCKET_FOR_NON_HH];
359 if (bucket->head) {
360 struct sk_buff *skb = dequeue_head(bucket);
367 /* Return id of the bucket from which the packet was dropped. */
368 return bucket - q->buckets;
376 struct wdrr_bucket *bucket;
381 bucket = &q->buckets[idx];
382 bucket_add(bucket, skb);
385 if (list_empty(&bucket->bucketchain)) {
393 /* Always move heavy-hitters to old bucket. */
395 list_add_tail(&bucket->bucketchain, &q->old_buckets);
398 list_add_tail(&bucket->bucketchain, &q->new_buckets);
400 bucket->deficit = weight * q->quantum;
408 * bucket.
422 struct wdrr_bucket *bucket;
432 bucket = list_first_entry(head, struct wdrr_bucket, bucketchain);
434 if (bucket->deficit <= 0) {
435 int weight = (bucket - q->buckets == WDRR_BUCKET_FOR_HH) ?
438 bucket->deficit += weight * q->quantum;
439 list_move_tail(&bucket->bucketchain, &q->old_buckets);
443 if (bucket->head) {
444 skb = dequeue_head(bucket);
452 list_move_tail(&bucket->bucketchain, &q->old_buckets);
454 list_del_init(&bucket->bucketchain);
458 bucket->deficit -= qdisc_pkt_len(skb);
642 struct wdrr_bucket *bucket = q->buckets + i;
644 INIT_LIST_HEAD(&bucket->bucketchain);