Lines Matching refs:ipt
79 struct tcf_ipt *ipt = to_ipt(a); in tcf_ipt_release() local
81 if (ipt->tcfi_t) { in tcf_ipt_release()
82 ipt_destroy_target(ipt->tcfi_t, a->idrinfo->net); in tcf_ipt_release()
83 kfree(ipt->tcfi_t); in tcf_ipt_release()
85 kfree(ipt->tcfi_tname); in tcf_ipt_release()
102 struct tcf_ipt *ipt; in __tcf_ipt_init() local
180 ipt = to_ipt(*a); in __tcf_ipt_init()
182 spin_lock_bh(&ipt->tcf_lock); in __tcf_ipt_init()
184 ipt_destroy_target(ipt->tcfi_t, net); in __tcf_ipt_init()
185 kfree(ipt->tcfi_tname); in __tcf_ipt_init()
186 kfree(ipt->tcfi_t); in __tcf_ipt_init()
188 ipt->tcfi_tname = tname; in __tcf_ipt_init()
189 ipt->tcfi_t = t; in __tcf_ipt_init()
190 ipt->tcfi_hook = hook; in __tcf_ipt_init()
191 spin_unlock_bh(&ipt->tcf_lock); in __tcf_ipt_init()
225 struct tcf_ipt *ipt = to_ipt(a); in tcf_ipt_act() local
230 .hook = ipt->tcfi_hook, in tcf_ipt_act()
237 spin_lock(&ipt->tcf_lock); in tcf_ipt_act()
239 tcf_lastuse_update(&ipt->tcf_tm); in tcf_ipt_act()
240 bstats_update(&ipt->tcf_bstats, skb); in tcf_ipt_act()
247 par.target = ipt->tcfi_t->u.kernel.target; in tcf_ipt_act()
248 par.targinfo = ipt->tcfi_t->data; in tcf_ipt_act()
257 ipt->tcf_qstats.drops++; in tcf_ipt_act()
268 spin_unlock(&ipt->tcf_lock); in tcf_ipt_act()
277 struct tcf_ipt *ipt = to_ipt(a); in tcf_ipt_dump() local
287 spin_lock_bh(&ipt->tcf_lock); in tcf_ipt_dump()
288 t = kmemdup(ipt->tcfi_t, ipt->tcfi_t->u.user.target_size, GFP_ATOMIC); in tcf_ipt_dump()
292 c.bindcnt = atomic_read(&ipt->tcf_bindcnt) - bind; in tcf_ipt_dump()
293 c.refcnt = refcount_read(&ipt->tcf_refcnt) - ref; in tcf_ipt_dump()
294 strcpy(t->u.user.name, ipt->tcfi_t->u.kernel.target->name); in tcf_ipt_dump()
296 if (nla_put(skb, TCA_IPT_TARG, ipt->tcfi_t->u.user.target_size, t) || in tcf_ipt_dump()
297 nla_put_u32(skb, TCA_IPT_INDEX, ipt->tcf_index) || in tcf_ipt_dump()
298 nla_put_u32(skb, TCA_IPT_HOOK, ipt->tcfi_hook) || in tcf_ipt_dump()
300 nla_put_string(skb, TCA_IPT_TABLE, ipt->tcfi_tname)) in tcf_ipt_dump()
303 tcf_tm_dump(&tm, &ipt->tcf_tm); in tcf_ipt_dump()
307 spin_unlock_bh(&ipt->tcf_lock); in tcf_ipt_dump()
312 spin_unlock_bh(&ipt->tcf_lock); in tcf_ipt_dump()