On Mon, Jul 22, 2024 at 6:53 AM Artem Savkov <asavkov@xxxxxxxxxx> wrote: > > bpf_xdp_get_xfrm_state(struct xdp_md *ctx, struct bpf_xfrm_state_opts *opts, > u32 opts__sz) __ksym; > @@ -745,7 +756,7 @@ SEC("tc") > int ipip_gue_set_tunnel(struct __sk_buff *skb) > { > struct bpf_tunnel_key key = {}; > - struct bpf_fou_encap encap = {}; > + struct bpf_fou_encap___local encap = {}; > void *data = (void *)(long)skb->data; > struct iphdr *iph = data; > void *data_end = (void *)(long)skb->data_end; > @@ -769,7 +780,7 @@ int ipip_gue_set_tunnel(struct __sk_buff *skb) > encap.sport = 0; > encap.dport = bpf_htons(5555); > > - ret = bpf_skb_set_fou_encap(skb, &encap, FOU_BPF_ENCAP_GUE); > + ret = bpf_skb_set_fou_encap(skb, &encap, FOU_BPF_ENCAP_GUE___local); > Casting won't work as the compiler still have no idea about struct > bpf_fou_encap. struct bpf_fou_encap; (struct bpf_fou_encap *)&encap works just fine. pw-bot: cr