Home
last modified time | relevance | path

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

/external/linux-kselftest/tools/testing/selftests/bpf/
Dtest_lirc_mode2_user.c51 int ret, lircfd, progfd, inputfd; in main() local
62 BPF_PROG_TYPE_LIRC_MODE2, &obj, &progfd); in main()
75 ret = bpf_prog_detach2(progfd, lircfd, BPF_LIRC_MODE2); in main()
100 ret = bpf_prog_attach(progfd, lircfd, BPF_LIRC_MODE2, 0); in main()
169 ret = bpf_prog_detach2(progfd, lircfd, BPF_LIRC_MODE2); in main()
Dtest_sock.c349 static int attach_sock_prog(int cgfd, int progfd, in attach_sock_prog() argument
352 return bpf_prog_attach(progfd, cgfd, attach_type, BPF_F_ALLOW_OVERRIDE); in attach_sock_prog()
401 int progfd = -1; in run_test_case() local
405 progfd = load_sock_prog(test->insns, test->expected_attach_type); in run_test_case()
406 if (progfd < 0) { in run_test_case()
413 if (attach_sock_prog(cgfd, progfd, test->attach_type) == -1) { in run_test_case()
439 if (progfd != -1) in run_test_case()
441 close(progfd); in run_test_case()
Dtest_sock_addr.c1526 int progfd = -1; in run_test_case() local
1531 progfd = test->loadfn(test); in run_test_case()
1532 if (test->expected_result == LOAD_REJECT && progfd < 0) in run_test_case()
1534 else if (test->expected_result == LOAD_REJECT || progfd < 0) in run_test_case()
1537 err = bpf_prog_attach(progfd, cgfd, test->attach_type, in run_test_case()
1588 if (progfd != -1) in run_test_case()
1590 close(progfd); in run_test_case()
Dtest_sysctl.c1553 int progfd = -1; in run_test_case() local
1561 progfd = load_sysctl_prog(test, sysctl_path); in run_test_case()
1562 if (progfd < 0) { in run_test_case()
1569 if (bpf_prog_attach(progfd, cgfd, atype, BPF_F_ALLOW_OVERRIDE) == -1) { in run_test_case()
1594 if (progfd != -1) in run_test_case()
1596 close(progfd); in run_test_case()
/external/bcc/src/cc/includes/
Dlibbpf.h64 int bpf_attach_socket(int sockfd, int progfd);
73 int bpf_attach_kprobe(int progfd, enum bpf_probe_attach_type attach_type,
77 int bpf_attach_uprobe(int progfd, enum bpf_probe_attach_type attach_type,
82 int bpf_attach_tracepoint(int progfd, const char *tp_category,
86 int bpf_attach_raw_tracepoint(int progfd, char *tp_name);
93 int bpf_attach_xdp(const char *dev_name, int progfd, uint32_t flags);
97 int bpf_attach_perf_event_raw(int progfd, void *perf_event_attr, pid_t pid,
101 int bpf_attach_perf_event(int progfd, uint32_t ev_type, uint32_t ev_config,
/external/bcc/src/cc/
Dlibbpf.h64 int bpf_attach_socket(int sockfd, int progfd);
73 int bpf_attach_kprobe(int progfd, enum bpf_probe_attach_type attach_type,
77 int bpf_attach_uprobe(int progfd, enum bpf_probe_attach_type attach_type,
82 int bpf_attach_tracepoint(int progfd, const char *tp_category,
86 int bpf_attach_raw_tracepoint(int progfd, char *tp_name);
93 int bpf_attach_xdp(const char *dev_name, int progfd, uint32_t flags);
97 int bpf_attach_perf_event_raw(int progfd, void *perf_event_attr, pid_t pid,
101 int bpf_attach_perf_event(int progfd, uint32_t ev_type, uint32_t ev_config,
Dlibbpf.c783 static int bpf_attach_tracing_event(int progfd, const char *event_path, int pid, in bpf_attach_tracing_event() argument
827 if (ioctl(*pfd, PERF_EVENT_IOC_SET_BPF, progfd) < 0) { in bpf_attach_tracing_event()
839 int bpf_attach_kprobe(int progfd, enum bpf_probe_attach_type attach_type, in bpf_attach_kprobe() argument
898 if (bpf_attach_tracing_event(progfd, buf, -1 /* PID */, &pfd) == 0) in bpf_attach_kprobe()
968 int bpf_attach_uprobe(int progfd, enum bpf_probe_attach_type attach_type, in bpf_attach_uprobe() argument
1028 if (bpf_attach_tracing_event(progfd, buf, pid, &pfd) == 0) in bpf_attach_uprobe()
1127 int bpf_attach_tracepoint(int progfd, const char *tp_category, in bpf_attach_tracepoint() argument
1135 if (bpf_attach_tracing_event(progfd, buf, -1 /* PID */, &pfd) == 0) in bpf_attach_tracepoint()
1141 if (bpf_attach_tracing_event(progfd, buf, -1 /* PID */, &pfd) == 0) in bpf_attach_tracepoint()
1156 int bpf_attach_raw_tracepoint(int progfd, char *tp_name) in bpf_attach_raw_tracepoint() argument
[all …]
/external/bcc/src/python/bcc/
D__init__.py868 def _attach_perf_event(self, progfd, ev_type, ev_config, argument
870 res = lib.bpf_attach_perf_event(progfd, ev_type, ev_config,