Lines Matching refs:ops

80 int lwtunnel_encap_add_ops(const struct lwtunnel_encap_ops *ops,  in lwtunnel_encap_add_ops()  argument
88 NULL, ops) ? 0 : -1; in lwtunnel_encap_add_ops()
92 int lwtunnel_encap_del_ops(const struct lwtunnel_encap_ops *ops, in lwtunnel_encap_del_ops() argument
103 ops, NULL) == ops) ? 0 : -1; in lwtunnel_encap_del_ops()
116 const struct lwtunnel_encap_ops *ops; in lwtunnel_build_state() local
129 ops = rcu_dereference(lwtun_encaps[encap_type]); in lwtunnel_build_state()
130 if (likely(ops && ops->build_state && try_module_get(ops->owner))) in lwtunnel_build_state()
135 ret = ops->build_state(net, encap, family, cfg, lws, extack); in lwtunnel_build_state()
137 module_put(ops->owner); in lwtunnel_build_state()
152 const struct lwtunnel_encap_ops *ops; in lwtunnel_valid_encap_type() local
162 ops = rcu_dereference(lwtun_encaps[encap_type]); in lwtunnel_valid_encap_type()
165 if (!ops) { in lwtunnel_valid_encap_type()
174 ops = rcu_dereference(lwtun_encaps[encap_type]); in lwtunnel_valid_encap_type()
179 ret = ops ? 0 : -EOPNOTSUPP; in lwtunnel_valid_encap_type()
223 const struct lwtunnel_encap_ops *ops = lwtun_encaps[lws->type]; in lwtstate_free() local
225 if (ops->destroy_state) { in lwtstate_free()
226 ops->destroy_state(lws); in lwtstate_free()
231 module_put(ops->owner); in lwtstate_free()
238 const struct lwtunnel_encap_ops *ops; in lwtunnel_fill_encap() local
255 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_fill_encap()
256 if (likely(ops && ops->fill_encap)) in lwtunnel_fill_encap()
257 ret = ops->fill_encap(skb, lwtstate); in lwtunnel_fill_encap()
278 const struct lwtunnel_encap_ops *ops; in lwtunnel_get_encap_size() local
289 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_get_encap_size()
290 if (likely(ops && ops->get_encap_size)) in lwtunnel_get_encap_size()
291 ret = nla_total_size(ops->get_encap_size(lwtstate)); in lwtunnel_get_encap_size()
300 const struct lwtunnel_encap_ops *ops; in lwtunnel_cmp_encap() local
317 ops = rcu_dereference(lwtun_encaps[a->type]); in lwtunnel_cmp_encap()
318 if (likely(ops && ops->cmp_encap)) in lwtunnel_cmp_encap()
319 ret = ops->cmp_encap(a, b); in lwtunnel_cmp_encap()
329 const struct lwtunnel_encap_ops *ops; in lwtunnel_output() local
343 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_output()
344 if (likely(ops && ops->output)) in lwtunnel_output()
345 ret = ops->output(net, sk, skb); in lwtunnel_output()
363 const struct lwtunnel_encap_ops *ops; in lwtunnel_xmit() local
378 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_xmit()
379 if (likely(ops && ops->xmit)) in lwtunnel_xmit()
380 ret = ops->xmit(skb); in lwtunnel_xmit()
398 const struct lwtunnel_encap_ops *ops; in lwtunnel_input() local
412 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_input()
413 if (likely(ops && ops->input)) in lwtunnel_input()
414 ret = ops->input(skb); in lwtunnel_input()