| /tools/testing/selftests/bpf/progs/ |
| A D | tcp_ca_kfunc.c | 7 extern void bbr_init(struct sock *sk) __ksym; 9 extern u32 bbr_sndbuf_expand(struct sock *sk) __ksym; 10 extern u32 bbr_undo_cwnd(struct sock *sk) __ksym; 12 extern u32 bbr_ssthresh(struct sock *sk) __ksym; 16 extern void dctcp_init(struct sock *sk) __ksym; 19 extern u32 dctcp_ssthresh(struct sock *sk) __ksym; 31 void BPF_PROG(init, struct sock *sk) in BPF_PROG() 57 u32 BPF_PROG(sndbuf_expand, struct sock *sk) in BPF_PROG() 63 u32 BPF_PROG(undo_cwnd, struct sock *sk) in BPF_PROG() 78 u32 BPF_PROG(ssthresh, struct sock *sk) in BPF_PROG() [all …]
|
| A D | lsm_cgroup.c | 51 static __always_inline int real_create(struct socket *sock, int family, in real_create() argument 54 struct sock *sk; in real_create() 61 sk = sock->sk; in real_create() 85 int BPF_PROG(socket_post_create, struct socket *sock, int family, in BPF_PROG() argument 89 return real_create(sock, family, protocol); in BPF_PROG() 94 int BPF_PROG(socket_post_create2, struct socket *sock, int family, in BPF_PROG() argument 98 return real_create(sock, family, protocol); in BPF_PROG() 101 static __always_inline int real_bind(struct socket *sock, in real_bind() argument 106 struct sock *sk = sock->sk; in real_bind() 134 return real_bind(sock, address, addrlen); in BPF_PROG() [all …]
|
| A D | bpf_cc_cubic.c | 29 extern void cubictcp_init(struct sock *sk) __ksym; 31 extern __u32 cubictcp_recalc_ssthresh(struct sock *sk) __ksym; 32 extern void cubictcp_state(struct sock *sk, __u8 new_state) __ksym; 33 extern __u32 tcp_reno_undo_cwnd(struct sock *sk) __ksym; 47 static void tcp_update_pacing_rate(struct sock *sk) in tcp_update_pacing_rate() 76 static void tcp_cwnd_reduction(struct sock *sk, int newly_acked_sacked, in tcp_cwnd_reduction() 105 static bool tcp_may_raise_cwnd(const struct sock *sk, const int flag) in tcp_may_raise_cwnd() 114 void BPF_PROG(bpf_cubic_init, struct sock *sk) in BPF_PROG() 154 __u32 BPF_PROG(bpf_cubic_recalc_ssthresh, struct sock *sk) in BPF_PROG() 160 void BPF_PROG(bpf_cubic_state, struct sock *sk, __u8 new_state) in BPF_PROG() [all …]
|
| A D | test_sk_storage_tracing.c | 33 int BPF_PROG(trace_inet_sock_set_state, struct sock *sk, int oldstate, in BPF_PROG() 53 static void set_task_info(struct sock *sk) in set_task_info() 71 int BPF_PROG(trace_inet_csk_listen_start, struct sock *sk) in BPF_PROG() 79 int BPF_PROG(trace_tcp_connect, struct sock *sk) in BPF_PROG() 87 int BPF_PROG(inet_csk_accept, struct sock *sk, struct proto_accept_arg *arg, in BPF_PROG() 88 struct sock *accepted_sk) in BPF_PROG() 96 int BPF_PROG(tcp_retransmit_synack, struct sock* sk, struct request_sock* req) in BPF_PROG()
|
| A D | tcp_ca_update.c | 13 void BPF_PROG(ca_update_1_init, struct sock *sk) in BPF_PROG() 19 void BPF_PROG(ca_update_2_init, struct sock *sk) in BPF_PROG() 25 void BPF_PROG(ca_update_cong_control, struct sock *sk, in BPF_PROG() 31 __u32 BPF_PROG(ca_update_ssthresh, struct sock *sk) in BPF_PROG() 37 __u32 BPF_PROG(ca_update_undo_cwnd, struct sock *sk) in BPF_PROG()
|
| A D | test_tcp_estats.c | 74 struct sock { struct 82 struct sock sk; 93 static inline struct inet_sock *inet_sk(const struct sock *sk) in inet_sk() 160 struct sock *sock; member 212 struct sock *sk) in tcp_estats_conn_id_init() 227 static __always_inline void tcp_estats_init(struct sock *sk, in tcp_estats_init() 236 static __always_inline void send_basic_event(struct sock *sk, in send_basic_event() 250 if (!arg->sock) in _dummy_tracepoint() 253 send_basic_event(arg->sock, TCP_ESTATS_TX_RESET); in _dummy_tracepoint()
|
| A D | bpf_iter_bpf_sk_storage_helpers.c | 30 struct socket *sock; in fill_socket_owner() local 36 sock = bpf_sock_from_file(file); in fill_socket_owner() 37 if (!sock) in fill_socket_owner() 40 sock_tgid = bpf_sk_storage_get(&sk_stg_map, sock->sk, 0, 0); in fill_socket_owner()
|
| A D | bpf_dctcp.c | 68 void BPF_PROG(bpf_dctcp_init, struct sock *sk) in BPF_PROG() 115 __u32 BPF_PROG(bpf_dctcp_ssthresh, struct sock *sk) in BPF_PROG() 125 void BPF_PROG(bpf_dctcp_update_alpha, struct sock *sk, __u32 flags) in BPF_PROG() 154 static void dctcp_react_to_loss(struct sock *sk) in dctcp_react_to_loss() 164 void BPF_PROG(bpf_dctcp_state, struct sock *sk, __u8 new_state) in BPF_PROG() 174 static void dctcp_ece_ack_cwr(struct sock *sk, __u32 ce_state) in dctcp_ece_ack_cwr() 189 static void dctcp_ece_ack_update(struct sock *sk, enum tcp_ca_event evt, in dctcp_ece_ack_update() 211 void BPF_PROG(bpf_dctcp_cwnd_event, struct sock *sk, enum tcp_ca_event ev) in BPF_PROG() 230 __u32 BPF_PROG(bpf_dctcp_cwnd_undo, struct sock *sk) in BPF_PROG() 237 extern void tcp_reno_cong_avoid(struct sock *sk, __u32 ack, __u32 acked) __ksym; [all …]
|
| A D | tcp_ca_write_sk_pacing.c | 24 void BPF_PROG(write_sk_pacing_init, struct sock *sk) in BPF_PROG() 35 void BPF_PROG(write_sk_pacing_cong_control, struct sock *sk, in BPF_PROG() 47 __u32 BPF_PROG(write_sk_pacing_ssthresh, struct sock *sk) in BPF_PROG() 53 __u32 BPF_PROG(write_sk_pacing_undo_cwnd, struct sock *sk) in BPF_PROG()
|
| A D | sock_iter_batch.c | 33 struct sock *sk = (struct sock *)ctx->sk_common; in iter_tcp_soreuse() 44 sk = bpf_core_cast(sk, struct sock); in iter_tcp_soreuse() 99 struct sock *sk = (struct sock *)ctx->udp_sk; in iter_udp_soreuse() 108 sk = bpf_core_cast(sk, struct sock); in iter_udp_soreuse()
|
| /tools/testing/selftests/net/ |
| A D | fin_ack_lat.c | 30 int sock = 0; in client() local 42 sock = socket(AF_INET, SOCK_STREAM, 0); in client() 43 if (sock < 0) in client() 51 if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, in client() 64 send(sock, &buffer, sizeof(buffer), 0); in client() 82 close(sock); in client() 112 int sock; in main() local 121 sock = socket(AF_INET, SOCK_STREAM, 0); in main() 122 if (sock < 0) in main() 137 if (listen(sock, 3) < 0) in main() [all …]
|
| A D | timestamping.c | 153 int sock, int recvmsg_flags, in printpacket() argument 308 sock, recvmsg_flags, in recvpacket() 324 int sock; in main() local 384 if (sock < 0) in main() 420 if (bind(sock, in main() 517 FD_SET(sock, &readfs); in main() 518 FD_SET(sock, &errorfs); in main() 529 if (FD_ISSET(sock, &readfs)) in main() 531 if (FD_ISSET(sock, &errorfs)) in main() 533 recvpacket(sock, 0, in main() [all …]
|
| A D | psock_tpacket.c | 102 if (sock == -1) { in pfsocket() 113 return sock; in pfsocket() 232 pfd.fd = sock; in walk_v1_v2_rx() 411 pfd.fd = sock; in walk_tx() 505 walk_tx(sock, ring); in walk_v1_v2() 593 pfd.fd = sock; in walk_v3_rx() 627 walk_tx(sock, ring); in walk_v3() 748 ring->walk(sock, ring); in walk_ring() 804 int sock; in test_tpacket() local 822 mmap_ring(sock, &ring); in test_tpacket() [all …]
|
| /tools/testing/selftests/net/netfilter/ |
| A D | conntrack_dump_flush.c | 109 portid = mnl_socket_get_portid(sock); in conntrack_data_insert() 119 if (mnl_socket_sendto(sock, nlh, nlh->nlmsg_len) < 0) { in conntrack_data_insert() 174 return conntrack_data_insert(sock, nlh, zone); in conntrack_data_generate_v4() 210 return conntrack_data_insert(sock, nlh, zone); in conntrack_data_generate_v6() 228 portid = mnl_socket_get_portid(sock); in conntracK_count_zone() 242 ret = mnl_socket_sendto(sock, nlh, nlh->nlmsg_len); in conntracK_count_zone() 275 portid = mnl_socket_get_portid(sock); in conntrack_flush_zone() 289 ret = mnl_socket_sendto(sock, nlh, nlh->nlmsg_len); in conntrack_flush_zone() 312 struct mnl_socket *sock; in FIXTURE() local 320 self->sock = mnl_socket_open(NETLINK_NETFILTER); in FIXTURE_SETUP() [all …]
|
| /tools/testing/selftests/mm/ |
| A D | map_populate.c | 39 ret = read(sock, &status, sizeof(int)); in parent_f() 46 ret = write(sock, &status, sizeof(int)); in parent_f() 56 static int child_f(int sock, unsigned long *smap, int fd) in child_f() argument 66 ret = write(sock, &buf, sizeof(int)); in child_f() 69 ret = read(sock, &buf, sizeof(int)); in child_f() 81 int sock[2], child, ret; in main() local 106 ret = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sock); in main() 113 ret = close(sock[0]); in main() 116 parent_f(sock[1], smap, child); in main() 121 ret = close(sock[1]); in main() [all …]
|
| /tools/lib/thermal/ |
| A D | thermal_nl.c | 61 err = nl_send_auto_complete(sock, msg); in nl_send_msg() 70 nl_recvmsgs(sock, cb); in nl_send_msg() 113 static int nl_get_multicast_id(struct nl_sock *sock, struct nl_cb *cb, in nl_get_multicast_id() argument 127 ctrlid = genl_ctrl_resolve(sock, "nlctrl"); in nl_get_multicast_id() 133 ret = nl_send_msg(sock, cb, msg, nl_family_handler, &grp); in nl_get_multicast_id() 147 struct nl_sock *sock; in nl_thermal_connect() local 153 sock = nl_socket_alloc(); in nl_thermal_connect() 154 if (!sock) in nl_thermal_connect() 157 if (genl_connect(sock)) in nl_thermal_connect() 166 *nl_sock = sock; in nl_thermal_connect() [all …]
|
| /tools/testing/selftests/drivers/net/hw/ |
| A D | tso.py | 18 def sock_wait_drain(sock, max_wait=1000): argument 22 outq = fcntl.ioctl(sock.fileno(), termios.TIOCOUTQ, one) 30 def tcp_sock_get_retrans(sock): argument 47 sock.connect((remote_v4, port)) 50 sock.connect((remote_v6, port)) 53 sock.send("ping".encode()) 54 sock_wait_drain(sock) 59 sock.send(buf) 60 sock_wait_drain(sock) 65 ksft_lt(tcp_sock_get_retrans(sock), 10) [all …]
|
| A D | rss_input_xfrm.py | 15 sock = socket.socket(af_inet, socket.SOCK_DGRAM) 16 sock.bind(("", local_port)) 17 sock.connect((cfg.remote_addr_v[ipver], remote_port)) 20 fd_read_timeout(sock.fileno(), 5) 21 return sock.getsockopt(socket.SOL_SOCKET, socket.SO_INCOMING_CPU)
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | cgroup_ancestor.c | 28 int sock, n; in send_datagram() local 34 sock = socket(AF_INET6, SOCK_DGRAM, 0); in send_datagram() 35 if (!ASSERT_OK_FD(sock, "create socket")) in send_datagram() 36 return sock; in send_datagram() 38 if (!ASSERT_OK(connect(sock, (struct sockaddr *)&addr, sizeof(addr)), "connect")) { in send_datagram() 39 close(sock); in send_datagram() 43 n = sendto(sock, buf, sizeof(buf), 0, (const struct sockaddr *)&addr, in send_datagram() 45 close(sock); in send_datagram()
|
| A D | xdp_flowtable.c | 37 int i, sock; in send_udp_traffic() local 42 sock = socket(AF_INET, SOCK_DGRAM, 0); in send_udp_traffic() 43 if (sock < 0) in send_udp_traffic() 44 return sock; in send_udp_traffic() 50 n = sendto(sock, buf, sizeof(buf), MSG_NOSIGNAL | MSG_CONFIRM, in send_udp_traffic() 53 close(sock); in send_udp_traffic() 59 close(sock); in send_udp_traffic()
|
| /tools/testing/selftests/net/tcp_ao/lib/ |
| A D | netlink.c | 18 if (*sock > 0) { in netlink_sock() 24 if (*sock < 0) { in netlink_sock() 34 static int netlink_check_answer(int sock, bool quite) in netlink_check_answer() argument 42 if (recv(sock, &answer, sizeof(answer), 0) < 0) { in netlink_check_answer() 177 if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) { in __add_veth() 181 return netlink_check_answer(sock, false); in __add_veth() 222 if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) { in __ip_addr_add() 226 return netlink_check_answer(sock, true); in __ip_addr_add() 283 return netlink_check_answer(sock, true); in __ip_route_add() 331 return netlink_check_answer(sock, false); in __link_set_up() [all …]
|
| /tools/testing/selftests/net/can/ |
| A D | test_raw_filter.c | 28 static int send_can_frames(int sock, int testcase) in send_can_frames() argument 36 if (write(sock, &frame, sizeof(frame)) < 0) in send_can_frames() 40 if (write(sock, &frame, sizeof(frame)) < 0) in send_can_frames() 44 if (write(sock, &frame, sizeof(frame)) < 0) in send_can_frames() 48 if (write(sock, &frame, sizeof(frame)) < 0) in send_can_frames() 59 int sock; in FIXTURE() local 88 self->sock = s; in FIXTURE_SETUP() 93 close(self->sock); in FIXTURE_TEARDOWN() 361 FD_SET(self->sock, &rdfs); in TEST_F() 367 ret = FD_ISSET(self->sock, &rdfs); in TEST_F() [all …]
|
| /tools/bpf/bpftool/ |
| A D | net.c | 114 int sock; in netlink_open() local 120 if (sock < 0) in netlink_open() 145 return sock; in netlink_open() 148 close(sock); in netlink_open() 164 len = recv(sock, buf, sizeof(buf), 0); in netlink_recv() 242 if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0) in netlink_get_class() 281 if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0) in netlink_get_qdisc() 908 int i, sock, ret, filter_idx = -1; in do_show() local 925 sock = netlink_open(&nl_pid); in do_show() 926 if (sock < 0) { in do_show() [all …]
|
| /tools/testing/selftests/net/mptcp/ |
| A D | mptcp_inq.c | 100 int sock = -1; in sock_listen_mptcp() local 117 if (sock < 0) in sock_listen_mptcp() 128 close(sock); in sock_listen_mptcp() 129 sock = -1; in sock_listen_mptcp() 134 if (sock < 0) in sock_listen_mptcp() 137 if (listen(sock, 20)) in sock_listen_mptcp() 140 return sock; in sock_listen_mptcp() 151 int sock = -1; in sock_connect_mptcp() local 158 if (sock < 0) in sock_connect_mptcp() 167 if (sock < 0) in sock_connect_mptcp() [all …]
|
| A D | mptcp_connect.c | 306 int sock = -1; in sock_listen_mptcp() local 323 if (sock < 0) in sock_listen_mptcp() 342 close(sock); in sock_listen_mptcp() 343 sock = -1; in sock_listen_mptcp() 350 return sock; in sock_listen_mptcp() 357 close(sock); in sock_listen_mptcp() 363 return sock; in sock_listen_mptcp() 377 int sock = -1; in sock_connect_mptcp() local 416 sock = -1; in sock_connect_mptcp() 420 sock = -1; in sock_connect_mptcp() [all …]
|