Lines Matching refs:err
34 int err; in do_attach() local
36 err = bpf_set_link_xdp_fd(idx, prog_fd, xdp_flags); in do_attach()
37 if (err < 0) { in do_attach()
39 return err; in do_attach()
43 err = bpf_map_update_elem(map_fd, &idx, &idx, 0); in do_attach()
44 if (err) in do_attach()
47 return err; in do_attach()
52 int err; in do_detach() local
54 err = bpf_set_link_xdp_fd(idx, -1, xdp_flags); in do_detach()
55 if (err < 0) in do_detach()
61 return err; in do_detach()
86 int opt, i, idx, err; in main() local
128 err = bpf_prog_load_xattr(&prog_load_attr, &obj, &prog_fd); in main()
129 if (err) { in main()
161 err = do_detach(idx, argv[i]); in main()
162 if (err) in main()
163 ret = err; in main()
165 err = do_attach(idx, prog_fd, map_fd, argv[i]); in main()
166 if (err) in main()
167 ret = err; in main()