Lines Matching defs:tp_c
71 struct tc_u_common *tp_c;
244 u32_lookup_ht(struct tc_u_common *tp_c, u32 handle)
248 for (ht = tp_c->hlist; ht; ht = ht->next)
276 struct tc_u_common *tp_c = tp->data;
281 ht = u32_lookup_ht(tp_c, TC_U32_HTID(handle));
296 static u32 gen_new_htid(struct tc_u_common *tp_c)
301 if (++tp_c->hgenerator == 0x7FF)
302 tp_c->hgenerator = 1;
303 } while (--i>0 && u32_lookup_ht(tp_c, (tp_c->hgenerator|0x800)<<20));
305 return i > 0 ? (tp_c->hgenerator|0x800)<<20 : 0;
311 struct tc_u_common *tp_c;
313 tp_c = tp->q->u32_node;
321 root_ht->handle = tp_c ? gen_new_htid(tp_c) : 0x80000000;
324 if (tp_c == NULL) {
325 tp_c = kzalloc(sizeof(*tp_c), GFP_KERNEL);
326 if (tp_c == NULL) {
330 tp_c->q = tp->q;
331 tp->q->u32_node = tp_c;
334 tp_c->refcnt++;
335 root_ht->next = tp_c->hlist;
336 tp_c->hlist = root_ht;
337 root_ht->tp_c = tp_c;
340 tp->data = tp_c;
394 struct tc_u_common *tp_c = tp->data;
401 for (hn = &tp_c->hlist; *hn; hn = &(*hn)->next) {
415 struct tc_u_common *tp_c = tp->data;
423 if (--tp_c->refcnt == 0) {
428 for (ht = tp_c->hlist; ht; ht = ht->next) {
433 while ((ht = tp_c->hlist) != NULL) {
434 tp_c->hlist = ht->next;
441 kfree(tp_c);
514 ht_down = u32_lookup_ht(ht->tp_c, handle);
553 struct tc_u_common *tp_c = tp->data;
591 ht->tp_c = tp_c;
596 ht->next = tp_c->hlist;
597 tp_c->hlist = ht;
683 struct tc_u_common *tp_c = tp->data;
691 for (ht = tp_c->hlist; ht; ht = ht->next) {