Lines Matching refs:bucket

329 static struct sk_buff *dequeue_head(struct wdrr_bucket *bucket)  in dequeue_head()  argument
331 struct sk_buff *skb = bucket->head; in dequeue_head()
333 bucket->head = skb->next; in dequeue_head()
339 static void bucket_add(struct wdrr_bucket *bucket, struct sk_buff *skb) in bucket_add() argument
341 if (bucket->head == NULL) in bucket_add()
342 bucket->head = skb; in bucket_add()
344 bucket->tail->next = skb; in bucket_add()
345 bucket->tail = skb; in bucket_add()
352 struct wdrr_bucket *bucket; in hhf_drop() local
355 bucket = &q->buckets[WDRR_BUCKET_FOR_HH]; in hhf_drop()
356 if (!bucket->head) in hhf_drop()
357 bucket = &q->buckets[WDRR_BUCKET_FOR_NON_HH]; in hhf_drop()
359 if (bucket->head) { in hhf_drop()
360 struct sk_buff *skb = dequeue_head(bucket); in hhf_drop()
368 return bucket - q->buckets; in hhf_drop()
376 struct wdrr_bucket *bucket; in hhf_enqueue() local
381 bucket = &q->buckets[idx]; in hhf_enqueue()
382 bucket_add(bucket, skb); in hhf_enqueue()
385 if (list_empty(&bucket->bucketchain)) { in hhf_enqueue()
395 list_add_tail(&bucket->bucketchain, &q->old_buckets); in hhf_enqueue()
398 list_add_tail(&bucket->bucketchain, &q->new_buckets); in hhf_enqueue()
400 bucket->deficit = weight * q->quantum; in hhf_enqueue()
422 struct wdrr_bucket *bucket; in hhf_dequeue() local
432 bucket = list_first_entry(head, struct wdrr_bucket, bucketchain); in hhf_dequeue()
434 if (bucket->deficit <= 0) { in hhf_dequeue()
435 int weight = (bucket - q->buckets == WDRR_BUCKET_FOR_HH) ? in hhf_dequeue()
438 bucket->deficit += weight * q->quantum; in hhf_dequeue()
439 list_move_tail(&bucket->bucketchain, &q->old_buckets); in hhf_dequeue()
443 if (bucket->head) { in hhf_dequeue()
444 skb = dequeue_head(bucket); in hhf_dequeue()
452 list_move_tail(&bucket->bucketchain, &q->old_buckets); in hhf_dequeue()
454 list_del_init(&bucket->bucketchain); in hhf_dequeue()
458 bucket->deficit -= qdisc_pkt_len(skb); in hhf_dequeue()
642 struct wdrr_bucket *bucket = q->buckets + i; in hhf_init() local
644 INIT_LIST_HEAD(&bucket->bucketchain); in hhf_init()