/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | sockopt_multi.c | 58 int cg_child, int sock_fd) in run_getsockopt_test() argument 67 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test() 141 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test() 180 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test() 208 int cg_child, int sock_fd) in run_setsockopt_test() argument 217 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_setsockopt_test() 244 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_setsockopt_test() 305 int sock_fd = -1; in test_sockopt_multi() local 321 sock_fd = socket(AF_INET, SOCK_STREAM, 0); in test_sockopt_multi() 322 if (CHECK_FAIL(sock_fd < 0)) in test_sockopt_multi() [all …]
|
A D | sockopt_qos_to_cc.c | 7 static void run_setsockopt_test(int cg_fd, int sock_fd) in run_setsockopt_test() argument 15 err = setsockopt(sock_fd, SOL_IPV6, IPV6_TCLASS, &buf, sizeof(buf)); in run_setsockopt_test() 21 err = getsockopt(sock_fd, SOL_TCP, TCP_CONGESTION, cc, &optlen); in run_setsockopt_test() 34 int sock_fd = -1; in test_sockopt_qos_to_cc() local 45 sock_fd = socket(AF_INET6, SOCK_STREAM, 0); in test_sockopt_qos_to_cc() 46 if (!ASSERT_GE(sock_fd, 0, "v6 socket open")) in test_sockopt_qos_to_cc() 49 err = setsockopt(sock_fd, SOL_TCP, TCP_CONGESTION, &cc_cubic, in test_sockopt_qos_to_cc() 61 run_setsockopt_test(cg_fd, sock_fd); in test_sockopt_qos_to_cc() 64 if (sock_fd != -1) in test_sockopt_qos_to_cc() 65 close(sock_fd); in test_sockopt_qos_to_cc()
|
A D | sockmap_basic.c | 206 __s64 *sock_fd = NULL; in test_sockmap_copy() local 225 sock_fd = calloc(num_sockets, sizeof(*sock_fd)); in test_sockmap_copy() 226 if (CHECK(!sock_fd, "calloc(sock_fd)", "failed to allocate\n")) in test_sockmap_copy() 230 sock_fd[i] = -1; in test_sockmap_copy() 235 sock_fd[i] = connected_socket_v4(); in test_sockmap_copy() 239 err = bpf_map_update_elem(src_fd, &i, &sock_fd[i], BPF_NOEXIST); in test_sockmap_copy() 277 for (i = 0; sock_fd && i < num_sockets; i++) in test_sockmap_copy() 278 if (sock_fd[i] >= 0) in test_sockmap_copy() 279 close(sock_fd[i]); in test_sockmap_copy() 280 if (sock_fd) in test_sockmap_copy() [all …]
|
A D | probe_user.c | 10 int err, results_map_fd, sock_fd, duration = 0; in serial_test_probe_user() local 46 sock_fd = socket(AF_INET, SOCK_STREAM, 0); in serial_test_probe_user() 47 if (CHECK(sock_fd < 0, "create_sock_fd", "err %d\n", sock_fd)) in serial_test_probe_user() 50 connect(sock_fd, &curr, sizeof(curr)); in serial_test_probe_user() 51 close(sock_fd); in serial_test_probe_user()
|
A D | bpf_iter.c | 946 int sock_fd = -1; in test_bpf_sk_storage_delete() local 957 sock_fd = socket(AF_INET6, SOCK_STREAM, 0); in test_bpf_sk_storage_delete() 994 if (sock_fd >= 0) in test_bpf_sk_storage_delete() 995 close(sock_fd); in test_bpf_sk_storage_delete() 1009 int sock_fd = -1; in test_bpf_sk_storage_get() local 1020 err = listen(sock_fd, 1); in test_bpf_sk_storage_get() 1046 close(sock_fd); in test_bpf_sk_storage_get() 1057 int sock_fd[3] = {-1, -1, -1}; in test_bpf_sk_storage_map() local 1068 num_sockets = ARRAY_SIZE(sock_fd); in test_bpf_sk_storage_map() 1118 if (sock_fd[i] >= 0) in test_bpf_sk_storage_map() [all …]
|
A D | sockopt.c | 879 int sock_fd, err, prog_fd; in run_test() local 902 sock_fd = socket(AF_INET, SOCK_STREAM, 0); in run_test() 903 if (sock_fd < 0) { in run_test() 910 err = setsockopt(sock_fd, test->set_level, test->set_optname, in run_test() 930 err = getsockopt(sock_fd, test->get_level, test->get_optname, in run_test() 963 close(sock_fd); in run_test()
|
A D | sk_lookup.c | 88 static int attach_reuseport(int sock_fd, struct bpf_program *reuseport_prog) in attach_reuseport() argument 98 err = setsockopt(sock_fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_EBPF, in attach_reuseport() 494 static int update_lookup_map(struct bpf_map *map, int index, int sock_fd) in update_lookup_map() argument 506 value = (uint64_t)sock_fd; in update_lookup_map()
|
/linux/arch/um/drivers/ |
A D | port_user.c | 150 int sock_fd; member 158 dup2(data->sock_fd, 0); in port_pre_exec() 159 dup2(data->sock_fd, 1); in port_pre_exec() 160 dup2(data->sock_fd, 2); in port_pre_exec() 161 close(data->sock_fd); in port_pre_exec() 183 { .sock_fd = new, in port_connection()
|
/linux/drivers/infiniband/hw/usnic/ |
A D | usnic_transport.c | 145 struct socket *usnic_transport_get_socket(int sock_fd) in usnic_transport_get_socket() argument 152 sock = sockfd_lookup(sock_fd, &err); in usnic_transport_get_socket() 155 sock_fd, err); in usnic_transport_get_socket()
|
A D | usnic_ib_qp_grp.c | 267 int sock_fd; in create_udp_flow() local 279 sock_fd = trans_spec->udp.sock_fd; in create_udp_flow() 282 sock = usnic_transport_get_socket(sock_fd); in create_udp_flow() 291 usnic_err("Protocol for fd %d is not UDP", sock_fd); in create_udp_flow()
|
A D | usnic_transport.h | 57 struct socket *usnic_transport_get_socket(int sock_fd);
|
A D | usnic_abi.h | 59 uint32_t sock_fd; member
|
/linux/tools/perf/ |
A D | builtin-daemon.c | 809 static int handle_server_socket(struct daemon *daemon, int sock_fd) in handle_server_socket() argument 815 fd = accept(sock_fd, NULL, NULL); in handle_server_socket() 1255 int sock_fd = -1, conf_fd = -1, signal_fd = -1; in __cmd_start() local 1295 sock_fd = setup_server_socket(daemon); in __cmd_start() 1296 if (sock_fd < 0) in __cmd_start() 1307 sock_pos = fdarray__add(&fda, sock_fd, POLLIN|POLLERR|POLLHUP, 0); in __cmd_start() 1330 err = handle_server_socket(daemon, sock_fd); in __cmd_start() 1347 if (sock_fd != -1) in __cmd_start() 1348 close(sock_fd); in __cmd_start()
|
/linux/tools/testing/selftests/bpf/ |
A D | test_progs.c | 935 int sock_fd; member 941 int sock_fd; in dispatch_thread() local 944 sock_fd = data->sock_fd; in dispatch_thread() 976 if (send_message(sock_fd, &msg_do_test) < 0) { in dispatch_thread() 988 err = recv_message(sock_fd, &msg_test_done); in dispatch_thread() 1012 if (recv_message(sock_fd, &msg_log) < 0) in dispatch_thread() 1055 if (send_message(sock_fd, &msg_exit) < 0) { in dispatch_thread() 1115 data[i].sock_fd = env.worker_socks[i]; in server_main()
|