Lines Matching refs:lwtstate
232 int lwtunnel_fill_encap(struct sk_buff *skb, struct lwtunnel_state *lwtstate, in lwtunnel_fill_encap() argument
239 if (!lwtstate) in lwtunnel_fill_encap()
242 if (lwtstate->type == LWTUNNEL_ENCAP_NONE || in lwtunnel_fill_encap()
243 lwtstate->type > LWTUNNEL_ENCAP_MAX) in lwtunnel_fill_encap()
252 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_fill_encap()
254 ret = ops->fill_encap(skb, lwtstate); in lwtunnel_fill_encap()
260 ret = nla_put_u16(skb, encap_type_attr, lwtstate->type); in lwtunnel_fill_encap()
273 int lwtunnel_get_encap_size(struct lwtunnel_state *lwtstate) in lwtunnel_get_encap_size() argument
278 if (!lwtstate) in lwtunnel_get_encap_size()
281 if (lwtstate->type == LWTUNNEL_ENCAP_NONE || in lwtunnel_get_encap_size()
282 lwtstate->type > LWTUNNEL_ENCAP_MAX) in lwtunnel_get_encap_size()
286 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_get_encap_size()
288 ret = nla_total_size(ops->get_encap_size(lwtstate)); in lwtunnel_get_encap_size()
327 struct lwtunnel_state *lwtstate; in lwtunnel_output() local
332 lwtstate = dst->lwtstate; in lwtunnel_output()
334 if (lwtstate->type == LWTUNNEL_ENCAP_NONE || in lwtunnel_output()
335 lwtstate->type > LWTUNNEL_ENCAP_MAX) in lwtunnel_output()
340 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_output()
361 struct lwtunnel_state *lwtstate; in lwtunnel_xmit() local
367 lwtstate = dst->lwtstate; in lwtunnel_xmit()
369 if (lwtstate->type == LWTUNNEL_ENCAP_NONE || in lwtunnel_xmit()
370 lwtstate->type > LWTUNNEL_ENCAP_MAX) in lwtunnel_xmit()
375 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_xmit()
396 struct lwtunnel_state *lwtstate; in lwtunnel_input() local
401 lwtstate = dst->lwtstate; in lwtunnel_input()
403 if (lwtstate->type == LWTUNNEL_ENCAP_NONE || in lwtunnel_input()
404 lwtstate->type > LWTUNNEL_ENCAP_MAX) in lwtunnel_input()
409 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_input()