Home
last modified time | relevance | path

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

/linux-6.6.21/net/core/
Dskmsg.c412 int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg, in sk_msg_recvmsg() argument
420 msg_rx = sk_psock_peek_msg(psock); in sk_msg_recvmsg()
470 msg_rx = sk_psock_next_msg(psock, msg_rx); in sk_msg_recvmsg()
478 msg_rx = sk_psock_dequeue_msg(psock); in sk_msg_recvmsg()
481 msg_rx = sk_psock_peek_msg(psock); in sk_msg_recvmsg()
490 struct sk_psock *psock; in sk_msg_is_readable() local
494 psock = sk_psock(sk); in sk_msg_is_readable()
495 if (likely(psock)) in sk_msg_is_readable()
496 empty = list_empty(&psock->ingress_msg); in sk_msg_is_readable()
527 struct sk_psock *psock, in sk_psock_skb_ingress_enqueue() argument
[all …]
Dsock_map.c128 static void sock_map_add_link(struct sk_psock *psock, in sock_map_add_link() argument
134 spin_lock_bh(&psock->link_lock); in sock_map_add_link()
135 list_add_tail(&link->list, &psock->link); in sock_map_add_link()
136 spin_unlock_bh(&psock->link_lock); in sock_map_add_link()
140 struct sk_psock *psock, void *link_raw) in sock_map_del_link() argument
145 spin_lock_bh(&psock->link_lock); in sock_map_del_link()
146 list_for_each_entry_safe(link, tmp, &psock->link, list) { in sock_map_del_link()
151 if (psock->saved_data_ready && progs->stream_parser) in sock_map_del_link()
153 if (psock->saved_data_ready && progs->stream_verdict) in sock_map_del_link()
155 if (psock->saved_data_ready && progs->skb_verdict) in sock_map_del_link()
[all …]
/linux-6.6.21/include/linux/
Dskmsg.h103 int (*psock_update_sk_prot)(struct sock *sk, struct sk_psock *psock,
131 int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg,
140 static inline void sk_msg_apply_bytes(struct sk_psock *psock, u32 bytes) in sk_msg_apply_bytes() argument
142 if (psock->apply_bytes) { in sk_msg_apply_bytes()
143 if (psock->apply_bytes < bytes) in sk_msg_apply_bytes()
144 psock->apply_bytes = 0; in sk_msg_apply_bytes()
146 psock->apply_bytes -= bytes; in sk_msg_apply_bytes()
287 static inline void sk_psock_set_state(struct sk_psock *psock, in sk_psock_set_state() argument
290 set_bit(bit, &psock->state); in sk_psock_set_state()
293 static inline void sk_psock_clear_state(struct sk_psock *psock, in sk_psock_clear_state() argument
[all …]
/linux-6.6.21/net/ipv4/
Dtcp_bpf.c32 static int bpf_tcp_ingress(struct sock *sk, struct sk_psock *psock, in bpf_tcp_ingress() argument
77 sk_psock_queue_msg(psock, tmp); in bpf_tcp_ingress()
78 sk_psock_data_ready(sk, psock); in bpf_tcp_ingress()
164 struct sk_psock *psock = sk_psock_get(sk); in tcp_bpf_sendmsg_redir() local
167 if (unlikely(!psock)) in tcp_bpf_sendmsg_redir()
170 ret = ingress ? bpf_tcp_ingress(sk, psock, msg, bytes, flags) : in tcp_bpf_sendmsg_redir()
172 sk_psock_put(sk, psock); in tcp_bpf_sendmsg_redir()
178 static int tcp_msg_wait_data(struct sock *sk, struct sk_psock *psock, in tcp_msg_wait_data() argument
193 !list_empty(&psock->ingress_msg) || in tcp_msg_wait_data()
200 static bool is_next_msg_fin(struct sk_psock *psock) in is_next_msg_fin() argument
[all …]
Dudp_bpf.c29 static bool psock_has_data(struct sk_psock *psock) in psock_has_data() argument
31 return !skb_queue_empty(&psock->ingress_skb) || in psock_has_data()
32 !sk_psock_queue_empty(psock); in psock_has_data()
38 static int udp_msg_wait_data(struct sock *sk, struct sk_psock *psock, in udp_msg_wait_data() argument
52 ret = udp_msg_has_data(sk, psock); in udp_msg_wait_data()
55 ret = udp_msg_has_data(sk, psock); in udp_msg_wait_data()
65 struct sk_psock *psock; in udp_bpf_recvmsg() local
74 psock = sk_psock_get(sk); in udp_bpf_recvmsg()
75 if (unlikely(!psock)) in udp_bpf_recvmsg()
78 if (!psock_has_data(psock)) { in udp_bpf_recvmsg()
[all …]
/linux-6.6.21/net/kcm/
Dkcmsock.c55 static void kcm_abort_tx_psock(struct kcm_psock *psock, int err, in kcm_abort_tx_psock() argument
58 struct sock *csk = psock->sk; in kcm_abort_tx_psock()
59 struct kcm_mux *mux = psock->mux; in kcm_abort_tx_psock()
65 if (psock->tx_stopped) { in kcm_abort_tx_psock()
70 psock->tx_stopped = 1; in kcm_abort_tx_psock()
71 KCM_STATS_INCR(psock->stats.tx_aborts); in kcm_abort_tx_psock()
73 if (!psock->tx_kcm) { in kcm_abort_tx_psock()
75 list_del(&psock->psock_avail_list); in kcm_abort_tx_psock()
84 queue_work(kcm_wq, &psock->tx_kcm->tx_work); in kcm_abort_tx_psock()
95 struct kcm_psock *psock) in kcm_update_rx_mux_stats() argument
[all …]
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-6.6.21/net/unix/
Dunix_bpf.c15 static int unix_msg_wait_data(struct sock *sk, struct sk_psock *psock, in unix_msg_wait_data() argument
30 if (!unix_sk_has_data(sk, psock)) { in unix_msg_wait_data()
34 ret = unix_sk_has_data(sk, psock); in unix_msg_wait_data()
54 struct sk_psock *psock; in unix_bpf_recvmsg() local
60 psock = sk_psock_get(sk); in unix_bpf_recvmsg()
61 if (unlikely(!psock)) in unix_bpf_recvmsg()
66 sk_psock_queue_empty(psock)) { in unix_bpf_recvmsg()
68 sk_psock_put(sk, psock); in unix_bpf_recvmsg()
73 copied = sk_msg_recvmsg(sk, psock, msg, len, flags); in unix_bpf_recvmsg()
79 data = unix_msg_wait_data(sk, psock, timeo); in unix_bpf_recvmsg()
[all …]
/linux-6.6.21/net/vmw_vsock/
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
82 psock = sk_psock_get(sk); in vsock_bpf_recvmsg()
83 if (unlikely(!psock)) in vsock_bpf_recvmsg()
87 if (vsock_has_data(sk, psock) && sk_psock_queue_empty(psock)) { in vsock_bpf_recvmsg()
89 sk_psock_put(sk, psock); in vsock_bpf_recvmsg()
[all …]
/linux-6.6.21/drivers/pcmcia/
Dtcic.c105 u_short psock; member
404 socket_table[sockets].psock = i; in init_tcic()
482 tcic_setw(TCIC_ADDR+2, socket_table[i].psock << TCIC_SS_SHFT); in init_tcic()
533 u_short psock; in tcic_interrupt() local
546 psock = socket_table[i].psock; in tcic_interrupt()
547 tcic_setl(TCIC_ADDR, (psock << TCIC_ADDR_SS_SHFT) in tcic_interrupt()
548 | TCIC_ADDR_INDREG | TCIC_SCF1(psock)); in tcic_interrupt()
550 latch = sstat ^ socket_table[psock].last_sstat; in tcic_interrupt()
595 u_short psock = container_of(sock, struct tcic_socket, socket)->psock; in tcic_get_status() local
598 tcic_setl(TCIC_ADDR, (psock << TCIC_ADDR_SS_SHFT) in tcic_get_status()
[all …]
Di82365.c149 u_short psock; member
224 reg = I365_REG(socket[sock].psock, reg); in i365_get()
237 u_char val = I365_REG(socket[sock].psock, reg); in i365_set()
579 socket[sockets].psock = sock; in identify()
662 static void __init add_socket(unsigned int port, int psock, int type) in add_socket() argument
665 socket[sockets].psock = psock; in add_socket()
683 t->ioaddr, t->psock*0x40); in add_pcic()
907 if (socket[sock].psock & 1) { in i365_get_status()
1120 pcic[s->type].name, s->psock);
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/
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-6.6.21/net/tls/
Dtls_sw.c849 struct sk_psock *psock; in bpf_exec_tx_verdict() local
857 psock = sk_psock_get(sk); in bpf_exec_tx_verdict()
858 if (!psock || !policy) { in bpf_exec_tx_verdict()
865 if (psock) in bpf_exec_tx_verdict()
866 sk_psock_put(sk, psock); in bpf_exec_tx_verdict()
871 if (psock->eval == __SK_NONE) { in bpf_exec_tx_verdict()
873 psock->eval = sk_psock_msg_verdict(sk, psock, msg); in bpf_exec_tx_verdict()
886 switch (psock->eval) { in bpf_exec_tx_verdict()
897 redir_ingress = psock->redir_ingress; in bpf_exec_tx_verdict()
898 sk_redir = psock->sk_redir; in bpf_exec_tx_verdict()
[all …]
Dtls_main.c411 struct sk_psock *psock; in tls_sk_poll() local
425 psock = sk_psock_get(sk); in tls_sk_poll()
429 sk_psock_queue_empty(psock)) in tls_sk_poll()
432 if (psock) in tls_sk_poll()
433 sk_psock_put(sk, psock); in tls_sk_poll()
/linux-6.6.21/include/net/
Daf_unix.h109 int unix_dgram_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
110 int unix_stream_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
Daf_vsock.h237 int vsock_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
Dudp.h529 int udp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
Dsock.h1305 struct sk_psock *psock,
Dtcp.h2372 int tcp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
/linux-6.6.21/Documentation/bpf/
Dmap_sockmap.rst311 retrieve the associated socket and its attached psock.