Lines Matching defs:tp_c
86 struct tc_u_common *tp_c;
237 u32_lookup_ht(struct tc_u_common *tp_c, u32 handle)
241 for (ht = tp_c->hlist; ht; ht = ht->next)
269 struct tc_u_common *tp_c = tp->data;
274 ht = u32_lookup_ht(tp_c, TC_U32_HTID(handle));
289 static u32 gen_new_htid(struct tc_u_common *tp_c)
294 if (++tp_c->hgenerator == 0x7FF)
295 tp_c->hgenerator = 1;
296 } while (--i>0 && u32_lookup_ht(tp_c, (tp_c->hgenerator|0x800)<<20));
298 return i > 0 ? (tp_c->hgenerator|0x800)<<20 : 0;
304 struct tc_u_common *tp_c;
306 for (tp_c = u32_list; tp_c; tp_c = tp_c->next)
307 if (tp_c->q == tp->q)
316 root_ht->handle = tp_c ? gen_new_htid(tp_c) : 0x80000000;
319 if (tp_c == NULL) {
320 tp_c = kzalloc(sizeof(*tp_c), GFP_KERNEL);
321 if (tp_c == NULL) {
325 tp_c->q = tp->q;
326 tp_c->next = u32_list;
327 u32_list = tp_c;
330 tp_c->refcnt++;
331 root_ht->next = tp_c->hlist;
332 tp_c->hlist = root_ht;
333 root_ht->tp_c = tp_c;
336 tp->data = tp_c;
390 struct tc_u_common *tp_c = tp->data;
397 for (hn = &tp_c->hlist; *hn; hn = &(*hn)->next) {
411 struct tc_u_common *tp_c = tp->data;
419 if (--tp_c->refcnt == 0) {
424 if (*tp_cp == tp_c) {
425 *tp_cp = tp_c->next;
430 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);
500 ht_down = u32_lookup_ht(ht->tp_c, handle);
538 struct tc_u_common *tp_c = tp->data;
575 ht->tp_c = tp_c;
580 ht->next = tp_c->hlist;
581 tp_c->hlist = ht;
684 struct tc_u_common *tp_c = tp->data;
692 for (ht = tp_c->hlist; ht; ht = ht->next) {