Lines Matching refs:clhash
674 void qdisc_class_hash_grow(struct Qdisc *sch, struct Qdisc_class_hash *clhash)
683 if (clhash->hashelems * 4 <= clhash->hashsize * 3)
685 nsize = clhash->hashsize * 2;
691 ohash = clhash->hash;
692 osize = clhash->hashsize;
701 clhash->hash = nhash;
702 clhash->hashsize = nsize;
703 clhash->hashmask = nmask;
710 int qdisc_class_hash_init(struct Qdisc_class_hash *clhash)
714 clhash->hash = qdisc_class_hash_alloc(size);
715 if (!clhash->hash)
717 clhash->hashsize = size;
718 clhash->hashmask = size - 1;
719 clhash->hashelems = 0;
724 void qdisc_class_hash_destroy(struct Qdisc_class_hash *clhash)
726 kvfree(clhash->hash);
730 void qdisc_class_hash_insert(struct Qdisc_class_hash *clhash,
736 h = qdisc_class_hash(cl->classid, clhash->hashmask);
737 hlist_add_head(&cl->hnode, &clhash->hash[h]);
738 clhash->hashelems++;
742 void qdisc_class_hash_remove(struct Qdisc_class_hash *clhash,
746 clhash->hashelems--;