Lines Matching refs:bucket

328 static struct sk_buff *dequeue_head(struct wdrr_bucket *bucket)  in dequeue_head()  argument
330 struct sk_buff *skb = bucket->head; in dequeue_head()
332 bucket->head = skb->next; in dequeue_head()
338 static void bucket_add(struct wdrr_bucket *bucket, struct sk_buff *skb) in bucket_add() argument
340 if (bucket->head == NULL) in bucket_add()
341 bucket->head = skb; in bucket_add()
343 bucket->tail->next = skb; in bucket_add()
344 bucket->tail = skb; in bucket_add()
351 struct wdrr_bucket *bucket; in hhf_drop() local
354 bucket = &q->buckets[WDRR_BUCKET_FOR_HH]; in hhf_drop()
355 if (!bucket->head) in hhf_drop()
356 bucket = &q->buckets[WDRR_BUCKET_FOR_NON_HH]; in hhf_drop()
358 if (bucket->head) { in hhf_drop()
359 struct sk_buff *skb = dequeue_head(bucket); in hhf_drop()
368 return bucket - q->buckets; in hhf_drop()
384 struct wdrr_bucket *bucket; in hhf_enqueue() local
389 bucket = &q->buckets[idx]; in hhf_enqueue()
390 bucket_add(bucket, skb); in hhf_enqueue()
393 if (list_empty(&bucket->bucketchain)) { in hhf_enqueue()
403 list_add_tail(&bucket->bucketchain, &q->old_buckets); in hhf_enqueue()
406 list_add_tail(&bucket->bucketchain, &q->new_buckets); in hhf_enqueue()
408 bucket->deficit = weight * q->quantum; in hhf_enqueue()
430 struct wdrr_bucket *bucket; in hhf_dequeue() local
440 bucket = list_first_entry(head, struct wdrr_bucket, bucketchain); in hhf_dequeue()
442 if (bucket->deficit <= 0) { in hhf_dequeue()
443 int weight = (bucket - q->buckets == WDRR_BUCKET_FOR_HH) ? in hhf_dequeue()
446 bucket->deficit += weight * q->quantum; in hhf_dequeue()
447 list_move_tail(&bucket->bucketchain, &q->old_buckets); in hhf_dequeue()
451 if (bucket->head) { in hhf_dequeue()
452 skb = dequeue_head(bucket); in hhf_dequeue()
460 list_move_tail(&bucket->bucketchain, &q->old_buckets); in hhf_dequeue()
462 list_del_init(&bucket->bucketchain); in hhf_dequeue()
466 bucket->deficit -= qdisc_pkt_len(skb); in hhf_dequeue()
657 struct wdrr_bucket *bucket = q->buckets + i; in hhf_init() local
659 INIT_LIST_HEAD(&bucket->bucketchain); in hhf_init()