Home
last modified time | relevance | path

Searched refs:psock (Results 1 – 17 of 17) sorted by relevance

/linux/net/core/
H A Dskmsg.c412 int __sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg, in __sk_msg_recvmsg() argument
421 msg_rx = sk_psock_peek_msg(psock); in __sk_msg_recvmsg()
461 sk_psock_msg_len_add(psock, -copy); in __sk_msg_recvmsg()
482 msg_rx = sk_psock_next_msg(psock, msg_rx); in __sk_msg_recvmsg()
490 msg_rx = sk_psock_dequeue_msg(psock); in __sk_msg_recvmsg()
493 msg_rx = sk_psock_peek_msg(psock); in __sk_msg_recvmsg()
500 int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg, in sk_msg_recvmsg() argument
503 return __sk_msg_recvmsg(sk, psock, msg, len, flags, NULL); in sk_msg_recvmsg()
509 struct sk_psock *psock; in sk_msg_is_readable() local
513 psock = sk_psock(sk); in sk_msg_is_readable()
[all …]
H A Dsock_map.c131 static void sock_map_add_link(struct sk_psock *psock, in sock_map_add_link() argument
137 spin_lock_bh(&psock->link_lock); in sock_map_add_link()
138 list_add_tail(&link->list, &psock->link); in sock_map_add_link()
139 spin_unlock_bh(&psock->link_lock); in sock_map_add_link()
143 struct sk_psock *psock, void *link_raw) in sock_map_del_link() argument
148 spin_lock_bh(&psock->link_lock); in sock_map_del_link()
149 list_for_each_entry_safe(link, tmp, &psock->link, list) { in sock_map_del_link()
154 if (psock->saved_data_ready && progs->stream_parser) in sock_map_del_link()
156 if (psock->saved_data_ready && progs->stream_verdict) in sock_map_del_link()
158 if (psock->saved_data_ready && progs->skb_verdict) in sock_map_del_link()
[all …]
/linux/include/linux/
H A Dskmsg.h116 int (*psock_update_sk_prot)(struct sock *sk, struct sk_psock *psock,
144 int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg,
146 int __sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg,
155 static inline void sk_msg_apply_bytes(struct sk_psock *psock, u32 bytes) in sk_msg_apply_bytes() argument
157 if (psock->apply_bytes) { in sk_msg_apply_bytes()
158 if (psock->apply_bytes < bytes) in sk_msg_apply_bytes()
159 psock->apply_bytes = 0; in sk_msg_apply_bytes()
161 psock->apply_bytes -= bytes; in sk_msg_apply_bytes()
302 static inline void sk_psock_set_state(struct sk_psock *psock, in sk_psock_set_state() argument
305 set_bit(bit, &psock->state); in sk_psock_set_state()
[all …]
/linux/net/ipv4/
H A Dtcp_bpf.c33 static int bpf_tcp_ingress(struct sock *sk, struct sk_psock *psock, in bpf_tcp_ingress() argument
79 if (!sk_psock_queue_msg(psock, tmp)) in bpf_tcp_ingress()
81 sk_psock_data_ready(sk, psock); in bpf_tcp_ingress()
167 struct sk_psock *psock = sk_psock_get(sk); in tcp_bpf_sendmsg_redir() local
170 if (unlikely(!psock)) in tcp_bpf_sendmsg_redir()
173 ret = ingress ? bpf_tcp_ingress(sk, psock, msg, bytes) : in tcp_bpf_sendmsg_redir()
175 sk_psock_put(sk, psock); in tcp_bpf_sendmsg_redir()
181 static int tcp_msg_wait_data(struct sock *sk, struct sk_psock *psock, in tcp_msg_wait_data() argument
196 !list_empty(&psock->ingress_msg) || in tcp_msg_wait_data()
203 static bool is_next_msg_fin(struct sk_psock *psock) in is_next_msg_fin() argument
[all …]
H A Dudp_bpf.c28 static bool psock_has_data(struct sk_psock *psock) in psock_has_data() argument
30 return !skb_queue_empty(&psock->ingress_skb) || in psock_has_data()
31 !sk_psock_queue_empty(psock); in psock_has_data()
37 static int udp_msg_wait_data(struct sock *sk, struct sk_psock *psock, in udp_msg_wait_data() argument
51 ret = udp_msg_has_data(sk, psock); in udp_msg_wait_data()
54 ret = udp_msg_has_data(sk, psock); in udp_msg_wait_data()
64 struct sk_psock *psock; in udp_bpf_recvmsg() local
73 psock = sk_psock_get(sk); in udp_bpf_recvmsg()
74 if (unlikely(!psock)) in udp_bpf_recvmsg()
77 if (!psock_has_data(psock)) { in udp_bpf_recvmsg()
[all …]
/linux/net/kcm/
H A Dkcmsock.c56 static void kcm_abort_tx_psock(struct kcm_psock *psock, int err, in kcm_abort_tx_psock() argument
59 struct sock *csk = psock->sk; in kcm_abort_tx_psock()
60 struct kcm_mux *mux = psock->mux; in kcm_abort_tx_psock()
66 if (psock->tx_stopped) { in kcm_abort_tx_psock()
71 psock->tx_stopped = 1; in kcm_abort_tx_psock()
72 KCM_STATS_INCR(psock->stats.tx_aborts); in kcm_abort_tx_psock()
74 if (!psock->tx_kcm) { in kcm_abort_tx_psock()
76 list_del(&psock->psock_avail_list); in kcm_abort_tx_psock()
85 queue_work(kcm_wq, &psock->tx_kcm->tx_work); in kcm_abort_tx_psock()
96 struct kcm_psock *psock) in kcm_update_rx_mux_stats() argument
[all …]
H A Dkcmproc.c139 static void kcm_format_psock(struct kcm_psock *psock, struct seq_file *seq, in kcm_format_psock() argument
144 psock->index, in kcm_format_psock()
145 psock->strp.stats.msgs, in kcm_format_psock()
146 psock->strp.stats.bytes, in kcm_format_psock()
147 psock->stats.tx_msgs, in kcm_format_psock()
148 psock->stats.tx_bytes, in kcm_format_psock()
149 psock->sk->sk_receive_queue.qlen, in kcm_format_psock()
150 atomic_read(&psock->sk->sk_rmem_alloc), in kcm_format_psock()
151 psock->sk->sk_write_queue.qlen, in kcm_format_psock()
152 refcount_read(&psock->sk->sk_wmem_alloc)); in kcm_format_psock()
[all …]
/linux/net/unix/
H A Dunix_bpf.c16 static int unix_msg_wait_data(struct sock *sk, struct sk_psock *psock, in unix_msg_wait_data() argument
31 if (!unix_sk_has_data(sk, psock)) { in unix_msg_wait_data()
35 ret = unix_sk_has_data(sk, psock); in unix_msg_wait_data()
55 struct sk_psock *psock; in unix_bpf_recvmsg() local
64 psock = sk_psock_get(sk); in unix_bpf_recvmsg()
65 if (unlikely(!psock)) in unix_bpf_recvmsg()
70 sk_psock_queue_empty(psock)) { in unix_bpf_recvmsg()
72 sk_psock_put(sk, psock); in unix_bpf_recvmsg()
77 copied = sk_msg_recvmsg(sk, psock, msg, len, flags); in unix_bpf_recvmsg()
83 data = unix_msg_wait_data(sk, psock, time in unix_bpf_recvmsg()
148 unix_dgram_bpf_update_proto(struct sock * sk,struct sk_psock * psock,bool restore) unix_dgram_bpf_update_proto() argument
164 unix_stream_bpf_update_proto(struct sock * sk,struct sk_psock * psock,bool restore) unix_stream_bpf_update_proto() argument
[all...]
H A Daf_unix.h62 int unix_dgram_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
63 int unix_stream_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
/linux/net/vmw_vsock/
H A Dvsock_bpf.c25 static bool vsock_has_data(struct sock *sk, struct sk_psock *psock) in vsock_has_data() argument
34 return vsock_sk_has_data(sk, psock); in vsock_has_data()
37 static bool vsock_msg_wait_data(struct sock *sk, struct sk_psock *psock, long timeo) in vsock_msg_wait_data() argument
51 ret = vsock_has_data(sk, psock); in vsock_msg_wait_data()
54 ret = vsock_has_data(sk, psock); in vsock_msg_wait_data()
79 struct sk_psock *psock; in vsock_bpf_recvmsg() local
83 psock = sk_psock_get(sk); in vsock_bpf_recvmsg()
84 if (unlikely(!psock)) in vsock_bpf_recvmsg()
95 if (vsock_has_data(sk, psock) && sk_psock_queue_empty(psock)) { in vsock_bpf_recvmsg()
150 vsock_bpf_update_proto(struct sock * sk,struct sk_psock * psock,bool restore) vsock_bpf_update_proto() argument
[all...]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dlwt_redirect.c162 int psock = -1; in send_and_capture_test_packets() local
179 psock = new_packet_sock(target_dev); in send_and_capture_test_packets()
182 ret = wait_for_packet(psock, filter, &timeo); in send_and_capture_test_packets()
189 if (psock >= 0) in send_and_capture_test_packets()
190 close(psock); in send_and_capture_test_packets()
/linux/net/tls/
H A Dtls_sw.c870 struct sk_psock *psock; in bpf_exec_tx_verdict() local
878 psock = sk_psock_get(sk); in bpf_exec_tx_verdict()
879 if (!psock || !policy) { in bpf_exec_tx_verdict()
886 if (psock) in bpf_exec_tx_verdict()
887 sk_psock_put(sk, psock); in bpf_exec_tx_verdict()
892 if (psock->eval == __SK_NONE) { in bpf_exec_tx_verdict()
894 psock->eval = sk_psock_msg_verdict(sk, psock, msg); in bpf_exec_tx_verdict()
920 switch (psock->eval) { in bpf_exec_tx_verdict()
931 redir_ingress = psock->redir_ingress; in bpf_exec_tx_verdict()
932 sk_redir = psock->sk_redir; in bpf_exec_tx_verdict()
[all …]
H A Dtls_main.c407 struct sk_psock *psock; in tls_sk_poll() local
421 psock = sk_psock_get(sk); in tls_sk_poll()
425 sk_psock_queue_empty(psock)) || in tls_sk_poll()
429 if (psock) in tls_sk_poll()
430 sk_psock_put(sk, psock); in tls_sk_poll()
/linux/include/net/
H A Daf_vsock.h263 int vsock_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
H A Dsock.h1346 struct sk_psock *psock,
H A Dtcp.h2856 int tcp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
/linux/Documentation/bpf/
H A Dmap_sockmap.rst311 retrieve the associated socket and its attached psock.