Home
last modified time | relevance | path

Searched refs:rc (Results 1 – 12 of 12) sorted by relevance

/linux-tools/ebpf/kernel-samples-bpf/
H A Dsockconn4lb_admin.c27 int fd, rc; in get_root_fd() local
45 rc = sys_bpf(BPF_OBJ_PIN, &attr_pin, sizeof(attr_pin)); in get_root_fd()
46 if (rc != 0) { in get_root_fd()
85 int i, rc, fd, n; in main() local
105 rc = sys_bpf(BPF_MAP_LOOKUP_ELEM, &attr_elem, sizeof(attr_elem)); in main()
106 if (rc!=0) { in main()
122 rc = sys_bpf(BPF_MAP_LOOKUP_ELEM, &attr_elem, sizeof(attr_elem)); in main()
123 if (rc!=0) { in main()
132 rc = sys_bpf(BPF_MAP_UPDATE_ELEM, &attr_elem, sizeof(attr_elem)); in main()
133 if (rc!=0) { in main()
[all …]
H A Dipfirewall_cmd.c50 int fd, rc; in main() local
74 rc = sys_bpf(BPF_MAP_UPDATE_ELEM, &attr_elem, sizeof(attr_elem)); in main()
75 if (rc<0) { in main()
87 rc = sys_bpf(BPF_MAP_UPDATE_ELEM, &attr_elem, sizeof(attr_elem)); in main()
88 if (rc<0) { in main()
H A Dl3lb_cmd.c53 int fd, rc; in main() local
94 rc = sys_bpf(BPF_MAP_UPDATE_ELEM, &attr_elem, sizeof(attr_elem)); in main()
95 if (rc<0) { in main()
H A Dl3lb_kern.c83 int i, o_ifindex=0, rc; in xdp_ipv4_l3lb() local
158rc = bpf_fib_lookup(ctx, &fib_params, sizeof(fib_params), BPF_FIB_LOOKUP_DIRECT); // 0, BPF_FIB_LO… in xdp_ipv4_l3lb()
159 if (rc == BPF_FIB_LKUP_RET_SUCCESS) { in xdp_ipv4_l3lb()
164 bpf_printk("fib failed: %d, try sending icmp ping?\n", rc); in xdp_ipv4_l3lb()
/linux-tools/ebpf/libbpf-bootstrap/
H A Dkprobe_client.c22 int fd, rc; in get_root_fd() local
32 int i, rc, fd; in main() local
47 rc = sys_bpf(BPF_MAP_LOOKUP_ELEM, &attr_elem, sizeof(attr_elem)); in main()
48 if (rc!=0) { in main()
/linux-tools/perf/uprobe/
H A Duprobe.cpp38 int rc = fread(&ehdr, sizeof(ehdr), 1, fp); in parse_elf64() local
39 if (rc != 1) return; in parse_elf64()
49 rc = fseek(fp, offset, SEEK_SET); in parse_elf64()
50 if (rc<0) { perror("fail to seek"); return; } in parse_elf64()
51 rc = fread(&phdr, sizeof(phdr), 1, fp); in parse_elf64()
52 if (rc != 1) { perror("fail to read program header"); return; } in parse_elf64()
66 rc = fseek(fp, offset, SEEK_SET); in parse_elf64()
67 if (rc<0) { perror("fail to seek"); return; } in parse_elf64()
68 rc = fread(&shdr, sizeof(shdr), 1, fp); in parse_elf64()
69 if (rc != 1) { perror("fail to read sec header"); return; } in parse_elf64()
[all …]
/linux-tools/drivers/mremap/module/
H A Dremap.c28 long rc; in main() local
59 rc = ioctl(fd, PTRACEXX_REMAP, &d); in main()
60 if (rc<0) { in main()
61 printf("fail to remap %ld\n", rc); in main()
H A Dptracexx.c40 unsigned long rc; in ptracexx_ioctl() local
61 rc = mremap_task(task, in ptracexx_ioctl()
65 if (IS_ERR((void*)rc)) { in ptracexx_ioctl()
66 printk("remap failed: %ld\n", rc); in ptracexx_ioctl()
/linux-tools/perf/profiler/
H A Dprofiler-kprobe.cpp72 int rc = fread(&ehdr, sizeof(ehdr), 1, fp); in parse_elf64() local
73 if (rc != 1) return; in parse_elf64()
84 rc = fseek(fp, offset, SEEK_SET); in parse_elf64()
85 if (rc<0) { perror("fail to seek"); return; } in parse_elf64()
86 rc = fread(&phdr, sizeof(phdr), 1, fp); in parse_elf64()
87 if (rc != 1) { perror("fail to read program header"); return; } in parse_elf64()
106 rc = fseek(fp, offset, SEEK_SET); in parse_elf64()
107 if (rc<0) { perror("fail to seek"); return; } in parse_elf64()
108 rc = fread(&shdr, sizeof(shdr), 1, fp); in parse_elf64()
109 if (rc != 1) { perror("fail to read sec header"); return; } in parse_elf64()
[all …]
H A Dprofiler.cpp75 int rc = fread(&ehdr, sizeof(ehdr), 1, fp); in parse_elf64() local
76 if (rc != 1) return; in parse_elf64()
87 rc = fseek(fp, offset, SEEK_SET); in parse_elf64()
88 if (rc<0) { perror("fail to seek"); return; } in parse_elf64()
89 rc = fread(&phdr, sizeof(phdr), 1, fp); in parse_elf64()
90 if (rc != 1) { perror("fail to read program header"); return; } in parse_elf64()
109 rc = fseek(fp, offset, SEEK_SET); in parse_elf64()
110 if (rc<0) { perror("fail to seek"); return; } in parse_elf64()
111 rc = fread(&shdr, sizeof(shdr), 1, fp); in parse_elf64()
112 if (rc != 1) { perror("fail to read sec header"); return; } in parse_elf64()
[all …]
/linux-tools/perf/contextswitch/
H A Dperf_cxt_switch_3.cpp72 int rc = fread(&ehdr, sizeof(ehdr), 1, fp); in parse_elf64() local
73 if (rc != 1) return; in parse_elf64()
84 rc = fseek(fp, offset, SEEK_SET); in parse_elf64()
85 if (rc<0) { perror("fail to seek"); return; } in parse_elf64()
86 rc = fread(&phdr, sizeof(phdr), 1, fp); in parse_elf64()
87 if (rc != 1) { perror("fail to read program header"); return; } in parse_elf64()
106 rc = fseek(fp, offset, SEEK_SET); in parse_elf64()
107 if (rc<0) { perror("fail to seek"); return; } in parse_elf64()
108 rc = fread(&shdr, sizeof(shdr), 1, fp); in parse_elf64()
109 if (rc != 1) { perror("fail to read sec header"); return; } in parse_elf64()
[all …]
/linux-tools/drivers/mremap/
H A Dinject.cpp119 long rc; in main() local
229 rc = ioctl(fd, PTRACEXX_REMAP, &d); in main()
230 if (rc<0) { in main()
231 printf("fail to remap %ld\n", rc); in main()
239 rc = ioctl(fd, PTRACEXX_REMAP, &d); in main()
240 if (rc<0) { in main()
241 printf("fail to remap %ld\n", rc); in main()