Lines Matching refs:opts
65 bpf_xdp_get_xfrm_state(struct xdp_md *ctx, struct bpf_xfrm_state_opts *opts, u32 opts__sz) in bpf_xdp_get_xfrm_state() argument
71 if (!opts || opts__sz < sizeof(opts->error)) in bpf_xdp_get_xfrm_state()
75 opts->error = -EINVAL; in bpf_xdp_get_xfrm_state()
79 if (unlikely(opts->netns_id < BPF_F_CURRENT_NETNS)) { in bpf_xdp_get_xfrm_state()
80 opts->error = -EINVAL; in bpf_xdp_get_xfrm_state()
84 if (opts->netns_id >= 0) { in bpf_xdp_get_xfrm_state()
85 net = get_net_ns_by_id(net, opts->netns_id); in bpf_xdp_get_xfrm_state()
87 opts->error = -ENONET; in bpf_xdp_get_xfrm_state()
92 x = xfrm_state_lookup(net, opts->mark, &opts->daddr, opts->spi, in bpf_xdp_get_xfrm_state()
93 opts->proto, opts->family); in bpf_xdp_get_xfrm_state()
95 if (opts->netns_id >= 0) in bpf_xdp_get_xfrm_state()
98 opts->error = -ENOENT; in bpf_xdp_get_xfrm_state()