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), bind); in tcf_pedit_init()
63 p = to_pedit(a); in tcf_pedit_init()
71 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()
166 WARN(1, "pedit BUG: index %d\n", p->tcf_index); in tcf_pedit()
169 p->tcf_qstats.overlimits++; in tcf_pedit()
171 bstats_update(&p->tcf_bstats, skb); in tcf_pedit()
172 spin_unlock(&p->tcf_lock); in tcf_pedit()
173 return p->tcf_action; in tcf_pedit()
180 struct tcf_pedit *p = a->priv; in tcf_pedit_dump() local
185 s = sizeof(*opt) + p->tcfp_nkeys * sizeof(struct tc_pedit_key); in tcf_pedit_dump()
192 memcpy(opt->keys, p->tcfp_keys, in tcf_pedit_dump()
193 p->tcfp_nkeys * sizeof(struct tc_pedit_key)); in tcf_pedit_dump()
194 opt->index = p->tcf_index; in tcf_pedit_dump()
195 opt->nkeys = p->tcfp_nkeys; in tcf_pedit_dump()
196 opt->flags = p->tcfp_flags; in tcf_pedit_dump()
197 opt->action = p->tcf_action; in tcf_pedit_dump()
198 opt->refcnt = p->tcf_refcnt - ref; in tcf_pedit_dump()
199 opt->bindcnt = p->tcf_bindcnt - bind; in tcf_pedit_dump()
203 t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install); in tcf_pedit_dump()
204 t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse); in tcf_pedit_dump()
205 t.expires = jiffies_to_clock_t(p->tcf_tm.expires); in tcf_pedit_dump()