Lines Matching refs:ipt

78 	struct tcf_ipt *ipt = to_ipt(a);  in tcf_ipt_release()  local
80 if (ipt->tcfi_t) { in tcf_ipt_release()
81 ipt_destroy_target(ipt->tcfi_t, a->idrinfo->net); in tcf_ipt_release()
82 kfree(ipt->tcfi_t); in tcf_ipt_release()
84 kfree(ipt->tcfi_tname); in tcf_ipt_release()
103 struct tcf_ipt *ipt; in __tcf_ipt_init() local
193 ipt = to_ipt(*a); in __tcf_ipt_init()
195 spin_lock_bh(&ipt->tcf_lock); in __tcf_ipt_init()
197 ipt_destroy_target(ipt->tcfi_t, net); in __tcf_ipt_init()
198 kfree(ipt->tcfi_tname); in __tcf_ipt_init()
199 kfree(ipt->tcfi_t); in __tcf_ipt_init()
201 ipt->tcfi_tname = tname; in __tcf_ipt_init()
202 ipt->tcfi_t = t; in __tcf_ipt_init()
203 ipt->tcfi_hook = hook; in __tcf_ipt_init()
204 spin_unlock_bh(&ipt->tcf_lock); in __tcf_ipt_init()
260 struct tcf_ipt *ipt = to_ipt(a); in tcf_ipt_act() local
265 .hook = ipt->tcfi_hook, in tcf_ipt_act()
287 spin_lock(&ipt->tcf_lock); in tcf_ipt_act()
289 tcf_lastuse_update(&ipt->tcf_tm); in tcf_ipt_act()
290 bstats_update(&ipt->tcf_bstats, skb); in tcf_ipt_act()
297 par.target = ipt->tcfi_t->u.kernel.target; in tcf_ipt_act()
298 par.targinfo = ipt->tcfi_t->data; in tcf_ipt_act()
310 ipt->tcf_qstats.drops++; in tcf_ipt_act()
321 spin_unlock(&ipt->tcf_lock); in tcf_ipt_act()
333 struct tcf_ipt *ipt = to_ipt(a); in tcf_ipt_dump() local
343 spin_lock_bh(&ipt->tcf_lock); in tcf_ipt_dump()
344 t = kmemdup(ipt->tcfi_t, ipt->tcfi_t->u.user.target_size, GFP_ATOMIC); in tcf_ipt_dump()
348 c.bindcnt = atomic_read(&ipt->tcf_bindcnt) - bind; in tcf_ipt_dump()
349 c.refcnt = refcount_read(&ipt->tcf_refcnt) - ref; in tcf_ipt_dump()
350 strcpy(t->u.user.name, ipt->tcfi_t->u.kernel.target->name); in tcf_ipt_dump()
352 if (nla_put(skb, TCA_IPT_TARG, ipt->tcfi_t->u.user.target_size, t) || in tcf_ipt_dump()
353 nla_put_u32(skb, TCA_IPT_INDEX, ipt->tcf_index) || in tcf_ipt_dump()
354 nla_put_u32(skb, TCA_IPT_HOOK, ipt->tcfi_hook) || in tcf_ipt_dump()
356 nla_put_string(skb, TCA_IPT_TABLE, ipt->tcfi_tname)) in tcf_ipt_dump()
359 tcf_tm_dump(&tm, &ipt->tcf_tm); in tcf_ipt_dump()
363 spin_unlock_bh(&ipt->tcf_lock); in tcf_ipt_dump()
368 spin_unlock_bh(&ipt->tcf_lock); in tcf_ipt_dump()