Lines Matching refs:ops
72 int lwtunnel_encap_add_ops(const struct lwtunnel_encap_ops *ops, in lwtunnel_encap_add_ops() argument
80 NULL, ops) ? 0 : -1; in lwtunnel_encap_add_ops()
84 int lwtunnel_encap_del_ops(const struct lwtunnel_encap_ops *ops, in lwtunnel_encap_del_ops() argument
95 ops, NULL) == ops) ? 0 : -1; in lwtunnel_encap_del_ops()
108 const struct lwtunnel_encap_ops *ops; in lwtunnel_build_state() local
121 ops = rcu_dereference(lwtun_encaps[encap_type]); in lwtunnel_build_state()
122 if (likely(ops && ops->build_state && try_module_get(ops->owner))) in lwtunnel_build_state()
127 ret = ops->build_state(net, encap, family, cfg, lws, extack); in lwtunnel_build_state()
129 module_put(ops->owner); in lwtunnel_build_state()
144 const struct lwtunnel_encap_ops *ops; in lwtunnel_valid_encap_type() local
154 ops = rcu_dereference(lwtun_encaps[encap_type]); in lwtunnel_valid_encap_type()
157 if (!ops) { in lwtunnel_valid_encap_type()
166 ops = rcu_dereference(lwtun_encaps[encap_type]); in lwtunnel_valid_encap_type()
171 ret = ops ? 0 : -EOPNOTSUPP; in lwtunnel_valid_encap_type()
211 const struct lwtunnel_encap_ops *ops = lwtun_encaps[lws->type]; in lwtstate_free() local
213 if (ops->destroy_state) { in lwtstate_free()
214 ops->destroy_state(lws); in lwtstate_free()
219 module_put(ops->owner); in lwtstate_free()
226 const struct lwtunnel_encap_ops *ops; in lwtunnel_fill_encap() local
243 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_fill_encap()
244 if (likely(ops && ops->fill_encap)) in lwtunnel_fill_encap()
245 ret = ops->fill_encap(skb, lwtstate); in lwtunnel_fill_encap()
266 const struct lwtunnel_encap_ops *ops; in lwtunnel_get_encap_size() local
277 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_get_encap_size()
278 if (likely(ops && ops->get_encap_size)) in lwtunnel_get_encap_size()
279 ret = nla_total_size(ops->get_encap_size(lwtstate)); in lwtunnel_get_encap_size()
288 const struct lwtunnel_encap_ops *ops; in lwtunnel_cmp_encap() local
305 ops = rcu_dereference(lwtun_encaps[a->type]); in lwtunnel_cmp_encap()
306 if (likely(ops && ops->cmp_encap)) in lwtunnel_cmp_encap()
307 ret = ops->cmp_encap(a, b); in lwtunnel_cmp_encap()
317 const struct lwtunnel_encap_ops *ops; in lwtunnel_output() local
331 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_output()
332 if (likely(ops && ops->output)) in lwtunnel_output()
333 ret = ops->output(net, sk, skb); in lwtunnel_output()
351 const struct lwtunnel_encap_ops *ops; in lwtunnel_xmit() local
366 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_xmit()
367 if (likely(ops && ops->xmit)) in lwtunnel_xmit()
368 ret = ops->xmit(skb); in lwtunnel_xmit()
386 const struct lwtunnel_encap_ops *ops; in lwtunnel_input() local
400 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_input()
401 if (likely(ops && ops->input)) in lwtunnel_input()
402 ret = ops->input(skb); in lwtunnel_input()