• Home
  • Raw
  • Download

Lines Matching refs:p

64 tcindex_lookup(struct tcindex_data *p, u16 key)  in tcindex_lookup()  argument
68 if (p->perfect) in tcindex_lookup()
69 return tcindex_filter_is_set(p->perfect + key) ? in tcindex_lookup()
70 p->perfect + key : NULL; in tcindex_lookup()
71 else if (p->h) { in tcindex_lookup()
72 for (f = p->h[key % p->hash]; f; f = f->next) in tcindex_lookup()
84 struct tcindex_data *p = PRIV(tp); in tcindex_classify() local
86 int key = (skb->tc_index & p->mask) >> p->shift; in tcindex_classify()
89 skb, tp, res, p); in tcindex_classify()
91 f = tcindex_lookup(p, key); in tcindex_classify()
93 if (!p->fall_through) in tcindex_classify()
109 struct tcindex_data *p = PRIV(tp); in tcindex_get() local
113 if (p->perfect && handle >= p->alloc_hash) in tcindex_get()
115 r = tcindex_lookup(p, handle); in tcindex_get()
128 struct tcindex_data *p; in tcindex_init() local
131 p = kzalloc(sizeof(struct tcindex_data), GFP_KERNEL); in tcindex_init()
132 if (!p) in tcindex_init()
135 p->mask = 0xffff; in tcindex_init()
136 p->hash = DEFAULT_HASH_SIZE; in tcindex_init()
137 p->fall_through = 1; in tcindex_init()
139 tp->root = p; in tcindex_init()
147 struct tcindex_data *p = PRIV(tp); in __tcindex_delete() local
151 pr_debug("tcindex_delete(tp %p,arg 0x%lx),p %p,f %p\n", tp, arg, p, f); in __tcindex_delete()
152 if (p->perfect) { in __tcindex_delete()
159 for (i = 0; i < p->hash; i++) in __tcindex_delete()
160 for (walk = p->h+i; *walk; walk = &(*walk)->next) in __tcindex_delete()
185 valid_perfect_hash(struct tcindex_data *p) in valid_perfect_hash() argument
187 return p->hash > (p->mask >> p->shift); in valid_perfect_hash()
200 struct tcindex_data *p, struct tcindex_filter_result *r, in tcindex_set_parms() argument
214 memcpy(&cp, p, sizeof(cp)); in tcindex_set_parms()
306 memcpy(p, &cp, sizeof(cp)); in tcindex_set_parms()
315 for (fp = p->h+(handle % p->hash); *fp; fp = &(*fp)->next) in tcindex_set_parms()
339 struct tcindex_data *p = PRIV(tp); in tcindex_change() local
345 tp, handle, tca, arg, opt, p, r, arg ? *arg : 0L); in tcindex_change()
354 return tcindex_set_parms(tp, base, handle, p, r, tb, tca[TCA_RATE]); in tcindex_change()
360 struct tcindex_data *p = PRIV(tp); in tcindex_walk() local
364 pr_debug("tcindex_walk(tp %p,walker %p),p %p\n", tp, walker, p); in tcindex_walk()
365 if (p->perfect) { in tcindex_walk()
366 for (i = 0; i < p->hash; i++) { in tcindex_walk()
367 if (!p->perfect[i].res.class) in tcindex_walk()
371 (unsigned long) (p->perfect+i), walker) in tcindex_walk()
380 if (!p->h) in tcindex_walk()
382 for (i = 0; i < p->hash; i++) { in tcindex_walk()
383 for (f = p->h[i]; f; f = next) { in tcindex_walk()
407 struct tcindex_data *p = PRIV(tp); in tcindex_destroy() local
410 pr_debug("tcindex_destroy(tp %p),p %p\n", tp, p); in tcindex_destroy()
415 kfree(p->perfect); in tcindex_destroy()
416 kfree(p->h); in tcindex_destroy()
417 kfree(p); in tcindex_destroy()
425 struct tcindex_data *p = PRIV(tp); in tcindex_dump() local
431 tp, fh, skb, t, p, r, b); in tcindex_dump()
432 pr_debug("p->perfect %p p->h %p\n", p->perfect, p->h); in tcindex_dump()
440 NLA_PUT_U32(skb, TCA_TCINDEX_HASH, p->hash); in tcindex_dump()
441 NLA_PUT_U16(skb, TCA_TCINDEX_MASK, p->mask); in tcindex_dump()
442 NLA_PUT_U32(skb, TCA_TCINDEX_SHIFT, p->shift); in tcindex_dump()
443 NLA_PUT_U32(skb, TCA_TCINDEX_FALL_THROUGH, p->fall_through); in tcindex_dump()
446 if (p->perfect) { in tcindex_dump()
447 t->tcm_handle = r-p->perfect; in tcindex_dump()
453 for (i = 0; !t->tcm_handle && i < p->hash; i++) { in tcindex_dump()
454 for (f = p->h[i]; !t->tcm_handle && f; in tcindex_dump()