Lines Matching refs:clhash
536 void qdisc_class_hash_grow(struct Qdisc *sch, struct Qdisc_class_hash *clhash)
545 if (clhash->hashelems * 4 <= clhash->hashsize * 3)
547 nsize = clhash->hashsize * 2;
553 ohash = clhash->hash;
554 osize = clhash->hashsize;
563 clhash->hash = nhash;
564 clhash->hashsize = nsize;
565 clhash->hashmask = nmask;
572 int qdisc_class_hash_init(struct Qdisc_class_hash *clhash)
576 clhash->hash = qdisc_class_hash_alloc(size);
577 if (clhash->hash == NULL)
579 clhash->hashsize = size;
580 clhash->hashmask = size - 1;
581 clhash->hashelems = 0;
586 void qdisc_class_hash_destroy(struct Qdisc_class_hash *clhash)
588 qdisc_class_hash_free(clhash->hash, clhash->hashsize);
592 void qdisc_class_hash_insert(struct Qdisc_class_hash *clhash,
598 h = qdisc_class_hash(cl->classid, clhash->hashmask);
599 hlist_add_head(&cl->hnode, &clhash->hash[h]);
600 clhash->hashelems++;
604 void qdisc_class_hash_remove(struct Qdisc_class_hash *clhash,
608 clhash->hashelems--;