Searched refs:progfd (Results 1 - 8 of 8) sorted by relevance

/linux-master/tools/testing/selftests/bpf/
H A Dtest_lirc_mode2_user.c52 int ret, lircfd, progfd, inputfd; local
63 BPF_PROG_TYPE_LIRC_MODE2, &obj, &progfd);
76 ret = bpf_prog_detach2(progfd, lircfd, BPF_LIRC_MODE2);
101 ret = bpf_prog_attach(progfd, lircfd, BPF_LIRC_MODE2, 0);
170 ret = bpf_prog_detach2(progfd, lircfd, BPF_LIRC_MODE2);
H A Dtest_sock.c407 static int attach_sock_prog(int cgfd, int progfd, argument
410 return bpf_prog_attach(progfd, cgfd, attach_type, BPF_F_ALLOW_OVERRIDE);
482 int progfd = -1; local
487 progfd = load_sock_prog(test->insns, test->expected_attach_type);
488 if (progfd < 0) {
495 if (attach_sock_prog(cgfd, progfd, test->attach_type) < 0) {
511 if (progfd != -1)
513 close(progfd);
H A Dtest_sock_addr.c1320 int progfd = -1; local
1325 progfd = test->loadfn(test);
1326 if (test->expected_result == LOAD_REJECT && progfd < 0)
1328 else if (test->expected_result == LOAD_REJECT || progfd < 0)
1331 err = bpf_prog_attach(progfd, cgfd, test->attach_type,
1382 if (progfd != -1)
1384 close(progfd);
H A Dtest_sysctl.c1547 int progfd = -1; local
1555 progfd = load_sysctl_prog(test, sysctl_path);
1556 if (progfd < 0) {
1563 if (bpf_prog_attach(progfd, cgfd, atype, BPF_F_ALLOW_OVERRIDE) < 0) {
1588 if (progfd != -1)
1590 close(progfd);
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dsockmap_helpers.h363 static inline int enable_reuseport(int s, int progfd) argument
370 err = xsetsockopt(s, SOL_SOCKET, SO_ATTACH_REUSEPORT_EBPF, &progfd,
371 sizeof(progfd));
378 static inline int socket_loopback_reuseport(int family, int sotype, int progfd) argument
390 if (progfd >= 0)
391 enable_reuseport(s, progfd);
H A Dsockmap_listen.c309 int progfd; member in struct:test
319 if (t->progfd != -1 &&
320 xbpf_prog_attach(t->progfd, mapfd, t->atype, 0) != 0)
325 if (t->progfd != -1)
326 xbpf_prog_detach2(t->progfd, mapfd, t->atype);
/linux-master/tools/bpf/bpftool/
H A Dnet.c633 static int do_attach_detach_xdp(int progfd, enum net_attach_type attach_type, argument
647 return bpf_xdp_attach(ifindex, progfd, flags, NULL);
653 int progfd, ifindex, err = 0; local
667 progfd = prog_parse_fd(&argc, &argv);
668 if (progfd < 0)
689 err = do_attach_detach_xdp(progfd, attach_type, ifindex,
700 close(progfd);
707 int progfd, ifindex, err = 0; local
725 progfd = -1;
727 err = do_attach_detach_xdp(progfd, attach_typ
[all...]
H A Dprog.c1032 static int parse_attach_detach_args(int argc, char **argv, int *progfd, argument
1039 *progfd = prog_parse_fd(&argc, &argv);
1040 if (*progfd < 0)
1041 return *progfd;
1068 int err, progfd; local
1072 &progfd, &attach_type, &mapfd);
1076 err = bpf_prog_attach(progfd, mapfd, attach_type, 0);
1090 int err, progfd; local
1094 &progfd, &attach_type, &mapfd);
1098 err = bpf_prog_detach2(progfd, mapf
[all...]

Completed in 166 milliseconds