Lines Matching defs:clhash
680 void qdisc_class_hash_grow(struct Qdisc *sch, struct Qdisc_class_hash *clhash)
689 if (clhash->hashelems * 4 <= clhash->hashsize * 3)
691 nsize = clhash->hashsize * 2;
697 ohash = clhash->hash;
698 osize = clhash->hashsize;
707 clhash->hash = nhash;
708 clhash->hashsize = nsize;
709 clhash->hashmask = nmask;
716 int qdisc_class_hash_init(struct Qdisc_class_hash *clhash)
720 clhash->hash = qdisc_class_hash_alloc(size);
721 if (!clhash->hash)
723 clhash->hashsize = size;
724 clhash->hashmask = size - 1;
725 clhash->hashelems = 0;
730 void qdisc_class_hash_destroy(struct Qdisc_class_hash *clhash)
732 kvfree(clhash->hash);
736 void qdisc_class_hash_insert(struct Qdisc_class_hash *clhash,
742 h = qdisc_class_hash(cl->classid, clhash->hashmask);
743 hlist_add_head(&cl->hnode, &clhash->hash[h]);
744 clhash->hashelems++;
748 void qdisc_class_hash_remove(struct Qdisc_class_hash *clhash,
752 clhash->hashelems--;