Lines Matching defs:clhash
685 void qdisc_class_hash_grow(struct Qdisc *sch, struct Qdisc_class_hash *clhash)
694 if (clhash->hashelems * 4 <= clhash->hashsize * 3)
696 nsize = clhash->hashsize * 2;
702 ohash = clhash->hash;
703 osize = clhash->hashsize;
712 clhash->hash = nhash;
713 clhash->hashsize = nsize;
714 clhash->hashmask = nmask;
721 int qdisc_class_hash_init(struct Qdisc_class_hash *clhash)
725 clhash->hash = qdisc_class_hash_alloc(size);
726 if (!clhash->hash)
728 clhash->hashsize = size;
729 clhash->hashmask = size - 1;
730 clhash->hashelems = 0;
735 void qdisc_class_hash_destroy(struct Qdisc_class_hash *clhash)
737 kvfree(clhash->hash);
741 void qdisc_class_hash_insert(struct Qdisc_class_hash *clhash,
747 h = qdisc_class_hash(cl->classid, clhash->hashmask);
748 hlist_add_head(&cl->hnode, &clhash->hash[h]);
749 clhash->hashelems++;
753 void qdisc_class_hash_remove(struct Qdisc_class_hash *clhash,
757 clhash->hashelems--;