Home
last modified time | relevance | path

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

/linux/include/linux/
H A Dskmsg.h117 int (*psock_update_sk_prot)(struct sock *sk, struct sk_psock *psock,
145 int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg,
147 int __sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg,
156 static inline void sk_msg_apply_bytes(struct sk_psock *psock, u32 bytes) in sk_msg_apply_bytes() argument
158 if (psock->apply_bytes) { in sk_msg_apply_bytes()
159 if (psock->apply_bytes < bytes) in sk_msg_apply_bytes()
160 psock->apply_bytes = 0; in sk_msg_apply_bytes()
162 psock->apply_bytes -= bytes; in sk_msg_apply_bytes()
309 static inline void sk_psock_set_state(struct sk_psock *psock, in sk_psock_set_state() argument
312 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 …]
/linux/net/kcm/
H A Dkcmsock.c58 static void kcm_abort_tx_psock(struct kcm_psock *psock, int err, in kcm_abort_tx_psock() argument
61 struct sock *csk = psock->sk; in kcm_abort_tx_psock()
62 struct kcm_mux *mux = psock->mux; in kcm_abort_tx_psock()
68 if (psock->tx_stopped) { in kcm_abort_tx_psock()
73 psock->tx_stopped = 1; in kcm_abort_tx_psock()
74 KCM_STATS_INCR(psock->stats.tx_aborts); in kcm_abort_tx_psock()
76 if (!psock->tx_kcm) { in kcm_abort_tx_psock()
78 list_del(&psock->psock_avail_list); in kcm_abort_tx_psock()
87 queue_work(kcm_wq, &psock->tx_kcm->tx_work); in kcm_abort_tx_psock()
98 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/net/core/
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/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/include/net/
H A Daf_vsock.h261 int vsock_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
H A Dudp.h653 int udp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
H A Dtcp.h2841 int tcp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
/linux/net/tls/
H A Dtls_sw.c2081 struct sk_psock *psock; in tls_sw_read_sock() local
2089 psock = sk_psock_get(sk); in tls_sw_read_sock()
2090 if (psock) { in tls_sw_read_sock()
2091 sk_psock_put(sk, psock); in tls_sw_read_sock()
/linux/Documentation/bpf/
H A Dmap_sockmap.rst311 retrieve the associated socket and its attached psock.