Lines Matching refs:ipt

76 	struct tcf_ipt *ipt = to_ipt(a);  in tcf_ipt_release()  local
78 if (ipt->tcfi_t) { in tcf_ipt_release()
79 ipt_destroy_target(ipt->tcfi_t, a->idrinfo->net); in tcf_ipt_release()
80 kfree(ipt->tcfi_t); in tcf_ipt_release()
82 kfree(ipt->tcfi_tname); in tcf_ipt_release()
100 struct tcf_ipt *ipt; in __tcf_ipt_init() local
178 ipt = to_ipt(*a); in __tcf_ipt_init()
180 spin_lock_bh(&ipt->tcf_lock); in __tcf_ipt_init()
182 ipt_destroy_target(ipt->tcfi_t, net); in __tcf_ipt_init()
183 kfree(ipt->tcfi_tname); in __tcf_ipt_init()
184 kfree(ipt->tcfi_t); in __tcf_ipt_init()
186 ipt->tcfi_tname = tname; in __tcf_ipt_init()
187 ipt->tcfi_t = t; in __tcf_ipt_init()
188 ipt->tcfi_hook = hook; in __tcf_ipt_init()
189 spin_unlock_bh(&ipt->tcf_lock); in __tcf_ipt_init()
223 struct tcf_ipt *ipt = to_ipt(a); in tcf_ipt_act() local
228 .hook = ipt->tcfi_hook, in tcf_ipt_act()
235 spin_lock(&ipt->tcf_lock); in tcf_ipt_act()
237 tcf_lastuse_update(&ipt->tcf_tm); in tcf_ipt_act()
238 bstats_update(&ipt->tcf_bstats, skb); in tcf_ipt_act()
245 par.target = ipt->tcfi_t->u.kernel.target; in tcf_ipt_act()
246 par.targinfo = ipt->tcfi_t->data; in tcf_ipt_act()
255 ipt->tcf_qstats.drops++; in tcf_ipt_act()
266 spin_unlock(&ipt->tcf_lock); in tcf_ipt_act()
275 struct tcf_ipt *ipt = to_ipt(a); in tcf_ipt_dump() local
285 spin_lock_bh(&ipt->tcf_lock); in tcf_ipt_dump()
286 t = kmemdup(ipt->tcfi_t, ipt->tcfi_t->u.user.target_size, GFP_ATOMIC); in tcf_ipt_dump()
290 c.bindcnt = atomic_read(&ipt->tcf_bindcnt) - bind; in tcf_ipt_dump()
291 c.refcnt = refcount_read(&ipt->tcf_refcnt) - ref; in tcf_ipt_dump()
292 strcpy(t->u.user.name, ipt->tcfi_t->u.kernel.target->name); in tcf_ipt_dump()
294 if (nla_put(skb, TCA_IPT_TARG, ipt->tcfi_t->u.user.target_size, t) || in tcf_ipt_dump()
295 nla_put_u32(skb, TCA_IPT_INDEX, ipt->tcf_index) || in tcf_ipt_dump()
296 nla_put_u32(skb, TCA_IPT_HOOK, ipt->tcfi_hook) || in tcf_ipt_dump()
298 nla_put_string(skb, TCA_IPT_TABLE, ipt->tcfi_tname)) in tcf_ipt_dump()
301 tcf_tm_dump(&tm, &ipt->tcf_tm); in tcf_ipt_dump()
305 spin_unlock_bh(&ipt->tcf_lock); in tcf_ipt_dump()
310 spin_unlock_bh(&ipt->tcf_lock); in tcf_ipt_dump()