Home
last modified time | relevance | path

Searched refs:lwtstate (Results 1 – 24 of 24) sorted by relevance

/linux-6.1.9/include/net/
Dlwtunnel.h45 struct lwtunnel_state *lwtstate);
46 int (*get_encap_size)(struct lwtunnel_state *lwtstate);
77 static inline bool lwtunnel_output_redirect(struct lwtunnel_state *lwtstate) in lwtunnel_output_redirect() argument
79 if (lwtstate && (lwtstate->flags & LWTUNNEL_STATE_OUTPUT_REDIRECT)) in lwtunnel_output_redirect()
85 static inline bool lwtunnel_input_redirect(struct lwtunnel_state *lwtstate) in lwtunnel_input_redirect() argument
87 if (lwtstate && (lwtstate->flags & LWTUNNEL_STATE_INPUT_REDIRECT)) in lwtunnel_input_redirect()
93 static inline bool lwtunnel_xmit_redirect(struct lwtunnel_state *lwtstate) in lwtunnel_xmit_redirect() argument
95 if (lwtstate && (lwtstate->flags & LWTUNNEL_STATE_XMIT_REDIRECT)) in lwtunnel_xmit_redirect()
101 static inline unsigned int lwtunnel_headroom(struct lwtunnel_state *lwtstate, in lwtunnel_headroom() argument
104 if ((lwtunnel_xmit_redirect(lwtstate) || in lwtunnel_headroom()
[all …]
Ddst_metadata.h62 if (dst && dst->lwtstate && in skb_tunnel_info()
63 (dst->lwtstate->type == LWTUNNEL_ENCAP_IP || in skb_tunnel_info()
64 dst->lwtstate->type == LWTUNNEL_ENCAP_IP6)) in skb_tunnel_info()
65 return lwt_tun_info(dst->lwtstate); in skb_tunnel_info()
84 if (dst && dst->lwtstate && in skb_xfrm_md_info()
85 dst->lwtstate->type == LWTUNNEL_ENCAP_XFRM) in skb_xfrm_md_info()
86 return lwt_xfrm_info(dst->lwtstate); in skb_xfrm_md_info()
Dmpls_iptunnel.h20 static inline struct mpls_iptunnel_encap *mpls_lwtunnel_encap(struct lwtunnel_state *lwtstate) in mpls_lwtunnel_encap() argument
22 return (struct mpls_iptunnel_encap *)lwtstate->data; in mpls_lwtunnel_encap()
Dip_tunnels.h510 static inline struct ip_tunnel_info *lwt_tun_info(struct lwtunnel_state *lwtstate) in lwt_tun_info() argument
512 return (struct ip_tunnel_info *)lwtstate->data; in lwt_tun_info()
530 static inline struct ip_tunnel_info *lwt_tun_info(struct lwtunnel_state *lwtstate) in lwt_tun_info() argument
Dip6_route.h275 mtu -= lwtunnel_headroom(dst->lwtstate, mtu); in ip6_skb_dst_mtu()
339 return mtu - lwtunnel_headroom(dst->lwtstate, mtu); in ip6_dst_mtu_maybe_forward()
Dip.h472 return mtu - lwtunnel_headroom(dst->lwtstate, mtu); in ip_dst_mtu_maybe_forward()
487 return mtu - lwtunnel_headroom(skb_dst(skb)->lwtstate, mtu); in ip_skb_dst_mtu()
Ddst.h72 struct lwtunnel_state *lwtstate; member
/linux-6.1.9/net/core/
Dlwtunnel.c235 int lwtunnel_fill_encap(struct sk_buff *skb, struct lwtunnel_state *lwtstate, in lwtunnel_fill_encap() argument
242 if (!lwtstate) in lwtunnel_fill_encap()
245 if (lwtstate->type == LWTUNNEL_ENCAP_NONE || in lwtunnel_fill_encap()
246 lwtstate->type > LWTUNNEL_ENCAP_MAX) in lwtunnel_fill_encap()
255 ops = rcu_dereference(lwtun_encaps[lwtstate->type]); in lwtunnel_fill_encap()
257 ret = ops->fill_encap(skb, lwtstate); in lwtunnel_fill_encap()
263 ret = nla_put_u16(skb, encap_type_attr, lwtstate->type); in lwtunnel_fill_encap()
276 int lwtunnel_get_encap_size(struct lwtunnel_state *lwtstate) in lwtunnel_get_encap_size() argument
281 if (!lwtstate) in lwtunnel_get_encap_size()
284 if (lwtstate->type == LWTUNNEL_ENCAP_NONE || in lwtunnel_get_encap_size()
[all …]
Dlwt_bpf.c122 bpf = bpf_lwt_lwtunnel(dst->lwtstate); in bpf_input()
131 if (unlikely(!dst->lwtstate->orig_input)) { in bpf_input()
136 return dst->lwtstate->orig_input(skb); in bpf_input()
145 bpf = bpf_lwt_lwtunnel(dst->lwtstate); in bpf_output()
152 if (unlikely(!dst->lwtstate->orig_output)) { in bpf_output()
159 return dst->lwtstate->orig_output(net, sk, skb); in bpf_output()
273 bpf = bpf_lwt_lwtunnel(dst->lwtstate); in bpf_xmit()
475 static int bpf_encap_nlsize(struct lwtunnel_state *lwtstate) in bpf_encap_nlsize() argument
Ddst.c68 dst->lwtstate = NULL; in dst_init()
122 lwtstate_put(dst->lwtstate); in dst_destroy()
/linux-6.1.9/net/ipv6/ila/
Dila_lwt.c42 struct ila_lwt *ilwt = ila_lwt_lwtunnel(orig_dst->lwtstate); in ila_output()
51 ila_params_lwtunnel(orig_dst->lwtstate), in ila_output()
58 return orig_dst->lwtstate->orig_output(net, sk, skb); in ila_output()
104 struct ila_lwt *ilwt = ila_lwt_lwtunnel(dst->lwtstate); in ila_input()
111 ila_params_lwtunnel(dst->lwtstate), in ila_input()
114 return dst->lwtstate->orig_input(skb); in ila_input()
263 struct lwtunnel_state *lwtstate) in ila_fill_encap_info() argument
265 struct ila_params *p = ila_params_lwtunnel(lwtstate); in ila_fill_encap_info()
266 struct ila_lwt *ilwt = ila_lwt_lwtunnel(lwtstate); in ila_fill_encap_info()
289 static int ila_encap_nlsize(struct lwtunnel_state *lwtstate) in ila_encap_nlsize() argument
/linux-6.1.9/net/mpls/
Dmpls_iptunnel.c61 !dst->lwtstate || skb_warn_if_lro(skb)) in mpls_xmit()
66 tun_encap_info = mpls_lwtunnel_encap(dst->lwtstate); in mpls_xmit()
229 struct lwtunnel_state *lwtstate) in mpls_fill_encap_info() argument
233 tun_encap_info = mpls_lwtunnel_encap(lwtstate); in mpls_fill_encap_info()
249 static int mpls_encap_nlsize(struct lwtunnel_state *lwtstate) in mpls_encap_nlsize() argument
254 tun_encap_info = mpls_lwtunnel_encap(lwtstate); in mpls_encap_nlsize()
/linux-6.1.9/net/ipv6/
Drpl_iptunnel.c197 tinfo = rpl_encap_lwtunnel(dst->lwtstate); in rpl_do_srh()
209 rlwt = rpl_lwt_lwtunnel(orig_dst->lwtstate); in rpl_output()
263 rlwt = rpl_lwt_lwtunnel(orig_dst->lwtstate); in rpl_input()
317 struct lwtunnel_state *lwtstate) in rpl_fill_encap_info() argument
319 struct rpl_iptunnel_encap *tuninfo = rpl_encap_lwtunnel(lwtstate); in rpl_fill_encap_info()
327 static int rpl_encap_nlsize(struct lwtunnel_state *lwtstate) in rpl_encap_nlsize() argument
329 struct rpl_iptunnel_encap *tuninfo = rpl_encap_lwtunnel(lwtstate); in rpl_encap_nlsize()
Dioam6_iptunnel.c307 ilwt = ioam6_lwt_state(dst->lwtstate); in ioam6_output()
387 return dst->lwtstate->orig_output(net, sk, skb); in ioam6_output()
399 struct lwtunnel_state *lwtstate) in ioam6_fill_encap_info() argument
401 struct ioam6_lwt *ilwt = ioam6_lwt_state(lwtstate); in ioam6_fill_encap_info()
428 static int ioam6_encap_nlsize(struct lwtunnel_state *lwtstate) in ioam6_encap_nlsize() argument
430 struct ioam6_lwt *ilwt = ioam6_lwt_state(lwtstate); in ioam6_encap_nlsize()
Dseg6_iptunnel.c380 tinfo = seg6_encap_lwtunnel(dst->lwtstate); in seg6_do_srh()
467 slwt = seg6_lwt_lwtunnel(orig_dst->lwtstate); in seg6_input_core()
537 slwt = seg6_lwt_lwtunnel(orig_dst->lwtstate); in seg6_output_core()
697 struct lwtunnel_state *lwtstate) in seg6_fill_encap_info() argument
699 struct seg6_iptunnel_encap *tuninfo = seg6_encap_lwtunnel(lwtstate); in seg6_fill_encap_info()
707 static int seg6_encap_nlsize(struct lwtunnel_state *lwtstate) in seg6_encap_nlsize() argument
709 struct seg6_iptunnel_encap *tuninfo = seg6_encap_lwtunnel(lwtstate); in seg6_encap_nlsize()
Dseg6_local.c522 slwt = seg6_local_lwtunnel(orig_dst->lwtstate); in input_action_end_dx6_finish()
575 slwt = seg6_local_lwtunnel(orig_dst->lwtstate); in input_action_end_dx4_finish()
1220 slwt = seg6_local_lwtunnel(orig_dst->lwtstate); in seg6_local_input_core()
Dip6_output.c112 if (lwtunnel_xmit_redirect(dst->lwtstate)) { in ip6_finish_output2()
Droute.c1104 rt->dst.lwtstate = lwtstate_get(res->nh->fib_nh_lws); in ip6_rt_init_dst()
5712 if (dst->lwtstate && in rt6_fill_node()
5713 lwtunnel_fill_encap(skb, dst->lwtstate, RTA_ENCAP, RTA_ENCAP_TYPE) < 0) in rt6_fill_node()
/linux-6.1.9/net/ipv4/
Dip_tunnel_core.c721 static void ip_tun_destroy_state(struct lwtunnel_state *lwtstate) in ip_tun_destroy_state() argument
724 struct ip_tunnel_info *tun_info = lwt_tun_info(lwtstate); in ip_tun_destroy_state()
839 struct lwtunnel_state *lwtstate) in ip_tun_fill_encap_info() argument
841 struct ip_tunnel_info *tun_info = lwt_tun_info(lwtstate); in ip_tun_fill_encap_info()
895 static int ip_tun_encap_nlsize(struct lwtunnel_state *lwtstate) in ip_tun_encap_nlsize() argument
903 + ip_tun_opts_nlsize(lwt_tun_info(lwtstate)); in ip_tun_encap_nlsize()
1001 struct lwtunnel_state *lwtstate) in ip6_tun_fill_encap_info() argument
1003 struct ip_tunnel_info *tun_info = lwt_tun_info(lwtstate); in ip6_tun_fill_encap_info()
1018 static int ip6_tun_encap_nlsize(struct lwtunnel_state *lwtstate) in ip6_tun_encap_nlsize() argument
1026 + ip_tun_opts_nlsize(lwt_tun_info(lwtstate)); in ip6_tun_encap_nlsize()
Dfib_semantics.c596 struct lwtunnel_state *lwtstate; in fib_nh_common_init() local
604 nhc->nhc_family, cfg, &lwtstate, in fib_nh_common_init()
609 nhc->nhc_lwtstate = lwtstate_get(lwtstate); in fib_nh_common_init()
860 struct lwtunnel_state *lwtstate; in fib_encap_match() local
867 cfg, &lwtstate, extack); in fib_encap_match()
869 result = lwtunnel_cmp_encap(lwtstate, nh->fib_nh_lws); in fib_encap_match()
870 lwtstate_free(lwtstate); in fib_encap_match()
Droute.c1599 rt->dst.lwtstate = lwtstate_get(nhc->nhc_lwtstate); in rt_set_nexthop()
1684 new_rt->dst.lwtstate = lwtstate_get(rt->dst.lwtstate); in rt_dst_clone()
2390 rth->dst.lwtstate = lwtstate_get(nhc->nhc_lwtstate); in ip_route_input_slow()
2391 if (lwtunnel_input_redirect(rth->dst.lwtstate)) { in ip_route_input_slow()
2393 rth->dst.lwtstate->orig_input = rth->dst.input; in ip_route_input_slow()
2980 if (rt->dst.lwtstate && in rt_fill_info()
2981 lwtunnel_fill_encap(skb, rt->dst.lwtstate, RTA_ENCAP, RTA_ENCAP_TYPE) < 0) in rt_fill_info()
Dip_output.c214 if (lwtunnel_xmit_redirect(dst->lwtstate)) { in ip_finish_output2()
/linux-6.1.9/net/netfilter/
Dnf_flow_table_offload.c107 if (other_dst && other_dst->lwtstate) { in nf_flow_rule_match()
108 tun_info = lwt_tun_info(other_dst->lwtstate); in nf_flow_rule_match()
590 if (dst && dst->lwtstate) { in flow_offload_encap_tunnel()
593 tun_info = lwt_tun_info(dst->lwtstate); in flow_offload_encap_tunnel()
615 if (dst && dst->lwtstate) { in flow_offload_decap_tunnel()
618 tun_info = lwt_tun_info(dst->lwtstate); in flow_offload_decap_tunnel()
/linux-6.1.9/net/xfrm/
Dxfrm_interface.c122 static int xfrmi_encap_nlsize(struct lwtunnel_state *lwtstate) in xfrmi_encap_nlsize() argument