Lines Matching refs:ipt
82 struct tcf_ipt *ipt = to_ipt(a); in tcf_ipt_release() local
84 if (ipt->tcfi_t) { in tcf_ipt_release()
85 ipt_destroy_target(ipt->tcfi_t); in tcf_ipt_release()
86 kfree(ipt->tcfi_t); in tcf_ipt_release()
88 kfree(ipt->tcfi_tname); in tcf_ipt_release()
104 struct tcf_ipt *ipt; in __tcf_ipt_init() local
181 ipt = to_ipt(*a); in __tcf_ipt_init()
183 spin_lock_bh(&ipt->tcf_lock); in __tcf_ipt_init()
185 ipt_destroy_target(ipt->tcfi_t); in __tcf_ipt_init()
186 kfree(ipt->tcfi_tname); in __tcf_ipt_init()
187 kfree(ipt->tcfi_t); in __tcf_ipt_init()
189 ipt->tcfi_tname = tname; in __tcf_ipt_init()
190 ipt->tcfi_t = t; in __tcf_ipt_init()
191 ipt->tcfi_hook = hook; in __tcf_ipt_init()
192 spin_unlock_bh(&ipt->tcf_lock); in __tcf_ipt_init()
229 struct tcf_ipt *ipt = to_ipt(a); in tcf_ipt_act() local
234 .hook = ipt->tcfi_hook, in tcf_ipt_act()
241 spin_lock(&ipt->tcf_lock); in tcf_ipt_act()
243 tcf_lastuse_update(&ipt->tcf_tm); in tcf_ipt_act()
244 bstats_update(&ipt->tcf_bstats, skb); in tcf_ipt_act()
251 par.target = ipt->tcfi_t->u.kernel.target; in tcf_ipt_act()
252 par.targinfo = ipt->tcfi_t->data; in tcf_ipt_act()
261 ipt->tcf_qstats.drops++; in tcf_ipt_act()
272 spin_unlock(&ipt->tcf_lock); in tcf_ipt_act()
281 struct tcf_ipt *ipt = to_ipt(a); in tcf_ipt_dump() local
291 spin_lock_bh(&ipt->tcf_lock); in tcf_ipt_dump()
292 t = kmemdup(ipt->tcfi_t, ipt->tcfi_t->u.user.target_size, GFP_ATOMIC); in tcf_ipt_dump()
296 c.bindcnt = atomic_read(&ipt->tcf_bindcnt) - bind; in tcf_ipt_dump()
297 c.refcnt = refcount_read(&ipt->tcf_refcnt) - ref; in tcf_ipt_dump()
298 strcpy(t->u.user.name, ipt->tcfi_t->u.kernel.target->name); in tcf_ipt_dump()
300 if (nla_put(skb, TCA_IPT_TARG, ipt->tcfi_t->u.user.target_size, t) || in tcf_ipt_dump()
301 nla_put_u32(skb, TCA_IPT_INDEX, ipt->tcf_index) || in tcf_ipt_dump()
302 nla_put_u32(skb, TCA_IPT_HOOK, ipt->tcfi_hook) || in tcf_ipt_dump()
304 nla_put_string(skb, TCA_IPT_TABLE, ipt->tcfi_tname)) in tcf_ipt_dump()
307 tcf_tm_dump(&tm, &ipt->tcf_tm); in tcf_ipt_dump()
311 spin_unlock_bh(&ipt->tcf_lock); in tcf_ipt_dump()
316 spin_unlock_bh(&ipt->tcf_lock); in tcf_ipt_dump()