Lines Matching refs:p
39 struct tcf_pedit *p; in tcf_pedit_init() local
60 ret = tcf_hash_create(parm->index, est, a, sizeof(*p), in tcf_pedit_init()
64 p = to_pedit(a); in tcf_pedit_init()
77 p = to_pedit(a); in tcf_pedit_init()
78 if (p->tcfp_nkeys && p->tcfp_nkeys != parm->nkeys) { in tcf_pedit_init()
85 spin_lock_bh(&p->tcf_lock); in tcf_pedit_init()
86 p->tcfp_flags = parm->flags; in tcf_pedit_init()
87 p->tcf_action = parm->action; in tcf_pedit_init()
89 kfree(p->tcfp_keys); in tcf_pedit_init()
90 p->tcfp_keys = keys; in tcf_pedit_init()
91 p->tcfp_nkeys = parm->nkeys; in tcf_pedit_init()
93 memcpy(p->tcfp_keys, parm->keys, ksize); in tcf_pedit_init()
94 spin_unlock_bh(&p->tcf_lock); in tcf_pedit_init()
102 struct tcf_pedit *p = a->priv; in tcf_pedit_cleanup() local
103 struct tc_pedit_key *keys = p->tcfp_keys; in tcf_pedit_cleanup()
110 struct tcf_pedit *p = a->priv; in tcf_pedit() local
115 return p->tcf_action; in tcf_pedit()
119 spin_lock(&p->tcf_lock); in tcf_pedit()
121 p->tcf_tm.lastuse = jiffies; in tcf_pedit()
123 if (p->tcfp_nkeys > 0) { in tcf_pedit()
124 struct tc_pedit_key *tkey = p->tcfp_keys; in tcf_pedit()
126 for (i = p->tcfp_nkeys; i > 0; i--, tkey++) { in tcf_pedit()
163 WARN(1, "pedit BUG: index %d\n", p->tcf_index); in tcf_pedit()
166 p->tcf_qstats.overlimits++; in tcf_pedit()
168 bstats_update(&p->tcf_bstats, skb); in tcf_pedit()
169 spin_unlock(&p->tcf_lock); in tcf_pedit()
170 return p->tcf_action; in tcf_pedit()
177 struct tcf_pedit *p = a->priv; in tcf_pedit_dump() local
182 s = sizeof(*opt) + p->tcfp_nkeys * sizeof(struct tc_pedit_key); in tcf_pedit_dump()
189 memcpy(opt->keys, p->tcfp_keys, in tcf_pedit_dump()
190 p->tcfp_nkeys * sizeof(struct tc_pedit_key)); in tcf_pedit_dump()
191 opt->index = p->tcf_index; in tcf_pedit_dump()
192 opt->nkeys = p->tcfp_nkeys; in tcf_pedit_dump()
193 opt->flags = p->tcfp_flags; in tcf_pedit_dump()
194 opt->action = p->tcf_action; in tcf_pedit_dump()
195 opt->refcnt = p->tcf_refcnt - ref; in tcf_pedit_dump()
196 opt->bindcnt = p->tcf_bindcnt - bind; in tcf_pedit_dump()
200 t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install); in tcf_pedit_dump()
201 t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse); in tcf_pedit_dump()
202 t.expires = jiffies_to_clock_t(p->tcf_tm.expires); in tcf_pedit_dump()