/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | udp_limit.c | 11 int fd1 = -1, fd2 = -1; local 32 fd1 = socket(AF_INET, SOCK_DGRAM, 0); 33 if (!ASSERT_GE(fd1, 0, "socket(fd1)")) 41 close(fd1); 42 fd1 = -1; 44 fd1 = socket(AF_INET, SOCK_DGRAM, 0); 45 if (!ASSERT_GE(fd1, 0, "socket(fd1-again)")) 50 * - open fd1 [all...] |
H A D | xdp_dev_bound_only.c | 29 int fd1 = -1; local 42 fd1 = load_dummy_prog("dummy1", ifindex, BPF_F_XDP_DEV_BOUND_ONLY); 43 if (!ASSERT_GE(fd1, 0, "load_dummy_prog #1")) { 54 close(fd1);
|
H A D | xdp_attach.c | 13 int err, fd1, fd2, fd3; local 18 err = bpf_prog_test_load(file, BPF_PROG_TYPE_XDP, &obj1, &fd1); 21 err = bpf_prog_get_info_by_fd(fd1, &info, &len); 40 err = bpf_xdp_attach(IFINDEX_LO, fd1, XDP_FLAGS_REPLACE, &opts); 53 opts.old_prog_fd = fd1;
|
H A D | tc_opts.c | 18 __u32 fd1, fd2, id1, id2; local 27 fd1 = bpf_program__fd(skel->progs.tc1); 30 id1 = id_from_prog_fd(fd1); 41 err = bpf_prog_attach_opts(fd1, loopback, BPF_TCX_INGRESS, &opta); 101 err = bpf_prog_detach_opts(fd1, loopback, BPF_TCX_INGRESS, &optd); 116 __u32 fd1, fd2, fd3, fd4, id1, id2, id3, id4; local 125 fd1 = bpf_program__fd(skel->progs.tc1); 130 id1 = id_from_prog_fd(fd1); 141 err = bpf_prog_attach_opts(fd1, loopback, target, &opta); 249 err = bpf_prog_detach_opts(fd1, loopbac 268 __u32 fd1, fd2, fd3, fd4, id1, id2, id3, id4; local 459 __u32 fd1, fd2, id1, id2; local 570 __u32 fd1, fd2, fd3, id1, id2, id3; local 671 __u32 fd1, fd2, fd3, id1, id2, id3, detach_fd; local 877 __u32 fd1, fd2, id1, id2; local 1031 __u32 fd1, fd2, fd3, fd4, id1, id2, id3, id4; local 1171 __u32 fd1, fd2, fd3, fd4, id1, id2, id3, id4; local 1311 __u32 fd1, fd2, fd3, fd4, id1, id2, id3, id4; local 1656 __u32 fd1, fd2, fd3, fd4, id1, id2, id3, id4; local 1827 __u32 fd1, fd2, fd3, fd4, id1, id2, id3, id4; local 2034 __u32 fd1, fd2, fd3, fd4, id1, id2, id3, id4; local 2282 __u32 fd1, fd2, fd3, id1, id2, id3; local 2467 __u32 fd1, fd2, fd3, fd4, id1, id2, id3, id4; local 2764 __u32 fd1, id1; local [all...] |
H A D | sockmap_helpers.h | 298 static inline int add_to_sockmap(int sock_mapfd, int fd1, int fd2) argument 305 value = fd1;
|
H A D | tc_netkit.c | 390 __u32 pid1, pid2, fd1, fd2; local 404 fd1 = bpf_program__fd(skel->progs.tc1); 407 pid1 = id_from_prog_fd(fd1); 418 err = bpf_prog_attach_opts(fd1, ifindex, target, &opta); 447 .relative_fd = fd1, 481 err = bpf_prog_detach_opts(fd1, ifindex, target, &optd);
|
/linux-master/tools/testing/selftests/net/ |
H A D | sk_bind_sendto_listen.c | 10 int fd1, fd2, one = 1; local 21 fd1 = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP); 22 if (fd1 < 0) { 23 error(1, errno, "socket fd1"); 27 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) { 28 error(1, errno, "setsockopt(SO_REUSEADDR) fd1"); 32 if (bind(fd1, (struct sockaddr *)&bind_addr, sizeof(bind_addr))) { 33 error(1, errno, "bind fd1"); 37 if (sendto(fd1, NULL, 0, MSG_FASTOPEN, (struct sockaddr *)&bind_addr, 39 error(1, errno, "sendto fd1"); [all...] |
H A D | sk_connect_zero_addr.c | 10 int fd1, fd2, one = 1; local 21 fd1 = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP); 22 if (fd1 < 0) { 23 error(1, errno, "socket fd1"); 27 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) { 28 error(1, errno, "setsockopt(SO_REUSEADDR) fd1"); 32 if (bind(fd1, (struct sockaddr *)&bind_addr, sizeof(bind_addr))) { 33 error(1, errno, "bind fd1"); 37 if (listen(fd1, 0)) { 54 close(fd1); [all...] |
H A D | reuseaddr_conflict.c | 89 int fd1, fd2; local 96 fd1 = open_port(0, 1); 97 if (fd1 >= 0) 100 fd1 = open_port(1, 1); 101 if (fd1 < 0) 107 close(fd1); 109 fd1 = open_port(0, 1); 110 if (fd1 >= 0)
|
H A D | reuseport_bpf.c | 309 int fd1, fd2, opt; local 312 fd1 = socket(p.recv_family, p.protocol, 0); 313 if (fd1 < 0) 320 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) 325 attach_ebpf(fd1, 10); 328 if (bind(fd1, addr, sockaddr_size())) 390 int fd1, fd2, opt = 1; local 393 fd1 = socket(AF_INET, SOCK_DGRAM, 0); 394 if (fd1 < 0) 399 if (setsockopt(fd1, SOL_SOCKE [all...] |
/linux-master/tools/testing/selftests/sync/ |
H A D | sync.h | 36 int sync_merge(const char *name, int fd1, int fd2);
|
H A D | sync.c | 68 int sync_merge(const char *name, int fd1, int fd2) argument 77 err = ioctl(fd1, SYNC_IOC_MERGE, &data);
|
/linux-master/tools/testing/selftests/powerpc/ptrace/ |
H A D | perf-hwbreak.c | 406 int fd1, fd2; local 410 fd1 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); 411 if (fd1 < 0) { 418 close(fd1); 423 ioctl(fd1, PERF_EVENT_IOC_RESET); 425 ioctl(fd1, PERF_EVENT_IOC_ENABLE); 428 ioctl(fd1, PERF_EVENT_IOC_DISABLE); 431 res = read(fd1, &breaks1, sizeof(breaks1)); 436 close(fd1); 451 int fd1, fd local 496 int fd1, fd2; local 541 int fd1, fd2; local 586 int *fd1 = malloc(nprocs * sizeof(int)); local 630 int *fd1 = malloc(nprocs * sizeof(int)); local 674 int *fd1 = malloc(nprocs * sizeof(int)); local 718 int *fd1 = malloc(nprocs * sizeof(int)); local [all...] |
/linux-master/tools/testing/selftests/proc/ |
H A D | fd-002-posix-eq.c | 27 int fd0, fd1, fd2; local 36 fd1 = open(buf, O_RDONLY); 37 assert(fd1 >= 0); 45 rv = fstat(fd1, &st1);
|
H A D | proc-pid-vm.c | 160 int fd, fd1; local 207 fd1 = open(buf, O_RDONLY|O_CLOEXEC); 210 return fd1;
|
/linux-master/tools/perf/tests/ |
H A D | bp_signal.c | 32 static int fd1; variable 75 ioctl(fd1, PERF_EVENT_IOC_DISABLE, 0); 96 ioctl(fd1, PERF_EVENT_IOC_DISABLE, 0); 193 * fd1 - breakpoint event on __test_function with SIGIO 206 * incq (%rdi) - fd1 event breakpoint hit -> count1 == 1 241 fd1 = bp_event(__test_function, SIGIO); 245 ioctl(fd1, PERF_EVENT_IOC_ENABLE, 0); 250 * Kick off the test by triggering 'fd1' 255 ioctl(fd1, PERF_EVENT_IOC_DISABLE, 0); 259 count1 = bp_count(fd1); [all...] |
/linux-master/tools/testing/selftests/kcmp/ |
H A D | kcmp_test.c | 23 static long sys_kcmp(int pid1, int pid2, int type, unsigned long fd1, unsigned long fd2) argument 25 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); 37 int fd1, fd2; local 42 fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644); 45 if (fd1 < 0) { 105 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2), 117 ret = sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd1);
|
/linux-master/tools/testing/selftests/core/ |
H A D | close_range_test.c | 361 int fd1, fd2, fd3, flags, ret, status; local 369 fd1 = open("/dev/null", O_RDWR); 370 EXPECT_GT(fd1, 0); 372 fd2 = dup2(fd1, 1000); 388 flags = fcntl(fd1, F_GETFD); 396 fd3 = dup2(fd1, 42); 418 flags = fcntl(fd1, F_GETFD); 426 fd3 = dup2(fd1, 42); 433 EXPECT_EQ(close(fd1), 0); 443 int i, fd1, fd local [all...] |
/linux-master/tools/testing/selftests/kvm/ |
H A D | guest_memfd_test.c | 149 int fd1, fd2, ret; local 152 fd1 = __vm_create_guest_memfd(vm, 4096, 0); 153 TEST_ASSERT(fd1 != -1, "memfd creation should succeed"); 155 ret = fstat(fd1, &st1); 166 ret = fstat(fd1, &st1); 172 close(fd1);
|
/linux-master/include/linux/ |
H A D | audit.h | 409 extern void __audit_fd_pair(int fd1, int fd2); 432 static inline void audit_fd_pair(int fd1, int fd2) argument 435 __audit_fd_pair(fd1, fd2); 648 static inline void audit_fd_pair(int fd1, int fd2) argument
|
/linux-master/scripts/kconfig/ |
H A D | confdata.c | 48 int fd1, fd2; local 53 fd1 = open(file1, O_RDONLY); 54 if (fd1 < 0) 61 ret = fstat(fd1, &st1); 71 map1 = mmap(NULL, st1.st_size, PROT_READ, MAP_PRIVATE, fd1, 0); 86 close(fd1);
|
/linux-master/tools/testing/selftests/mm/ |
H A D | hmm-tests.c | 93 int fd1; local 154 self->fd1 = hmm_open(variant->device_number1); 155 ASSERT_GE(self->fd1, 0); 173 ret = close(self->fd1); 175 self->fd1 = -1; 1179 ret = hmm_migrate_sys_to_dev(self->fd1, buffer, npages); 1187 ret = hmm_migrate_sys_to_dev(self->fd1, buffer, 3); 1219 ret = hmm_migrate_sys_to_dev(self->fd1, buffer, 4); 1533 ret = hmm_migrate_sys_to_dev(self->fd1, buffer, 1); 1689 ret = hmm_dmirror_cmd(self->fd1, HMM_DMIRROR_REA [all...] |
/linux-master/tools/power/x86/intel-speed-select/ |
H A D | isst-config.c | 999 int fd, fd1, len, ret; local 1028 fd1 = open("/sys/fs/cgroup/0-0-0/cpuset.cpus.partition", O_RDONLY, 0); 1030 if (fd1 < 0) { 1036 len = read(fd1, str, sizeof(str)); 1038 close(fd1); 1043 close(fd1);
|
/linux-master/net/ |
H A D | socket.c | 1730 int fd1, fd2, err; local 1746 fd1 = get_unused_fd_flags(flags); 1747 if (unlikely(fd1 < 0)) 1748 return fd1; 1752 put_unused_fd(fd1); 1756 err = put_user(fd1, &usockvec[0]); 1807 audit_fd_pair(fd1, fd2); 1809 fd_install(fd1, newfile1); 1815 put_unused_fd(fd1);
|
/linux-master/drivers/net/wireless/ath/carl9170/ |
H A D | phy.c | 970 u32 d0, d1, td0, td1, fd0, fd1; local 1019 fd1 = td1 << 5 | td0; 1024 carl9170_regwrite(0x1c58e8, fd1);
|