Home
last modified time | relevance | path

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

/Linux-v5.15/net/core/
Dskmsg.c403 int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg, in sk_msg_recvmsg() argument
411 msg_rx = sk_psock_peek_msg(psock); in sk_msg_recvmsg()
459 msg_rx = sk_psock_next_msg(psock, msg_rx); in sk_msg_recvmsg()
467 msg_rx = sk_psock_dequeue_msg(psock); in sk_msg_recvmsg()
470 msg_rx = sk_psock_peek_msg(psock); in sk_msg_recvmsg()
479 struct sk_psock *psock; in sk_msg_is_readable() local
483 psock = sk_psock(sk); in sk_msg_is_readable()
484 if (likely(psock)) in sk_msg_is_readable()
485 empty = list_empty(&psock->ingress_msg); in sk_msg_is_readable()
511 struct sk_psock *psock, in sk_psock_skb_ingress_enqueue() argument
[all …]
Dsock_map.c132 static void sock_map_add_link(struct sk_psock *psock, in sock_map_add_link() argument
138 spin_lock_bh(&psock->link_lock); in sock_map_add_link()
139 list_add_tail(&link->list, &psock->link); in sock_map_add_link()
140 spin_unlock_bh(&psock->link_lock); in sock_map_add_link()
144 struct sk_psock *psock, void *link_raw) in sock_map_del_link() argument
149 spin_lock_bh(&psock->link_lock); in sock_map_del_link()
150 list_for_each_entry_safe(link, tmp, &psock->link, list) { in sock_map_del_link()
155 if (psock->saved_data_ready && stab->progs.stream_parser) in sock_map_del_link()
157 if (psock->saved_data_ready && stab->progs.stream_verdict) in sock_map_del_link()
159 if (psock->saved_data_ready && stab->progs.skb_verdict) in sock_map_del_link()
[all …]
/Linux-v5.15/net/ipv4/
Dtcp_bpf.c13 static int bpf_tcp_ingress(struct sock *sk, struct sk_psock *psock, in bpf_tcp_ingress() argument
55 sk_psock_queue_msg(psock, tmp); in bpf_tcp_ingress()
56 sk_psock_data_ready(sk, psock); in bpf_tcp_ingress()
138 struct sk_psock *psock = sk_psock_get(sk); in tcp_bpf_sendmsg_redir() local
141 if (unlikely(!psock)) { in tcp_bpf_sendmsg_redir()
145 ret = ingress ? bpf_tcp_ingress(sk, psock, msg, bytes, flags) : in tcp_bpf_sendmsg_redir()
147 sk_psock_put(sk, psock); in tcp_bpf_sendmsg_redir()
153 static int tcp_msg_wait_data(struct sock *sk, struct sk_psock *psock, in tcp_msg_wait_data() argument
168 !list_empty(&psock->ingress_msg) || in tcp_msg_wait_data()
178 struct sk_psock *psock; in tcp_bpf_recvmsg() local
[all …]
Dudp_bpf.c30 static bool psock_has_data(struct sk_psock *psock) in psock_has_data() argument
32 return !skb_queue_empty(&psock->ingress_skb) || in psock_has_data()
33 !sk_psock_queue_empty(psock); in psock_has_data()
39 static int udp_msg_wait_data(struct sock *sk, struct sk_psock *psock, in udp_msg_wait_data() argument
53 ret = udp_msg_has_data(sk, psock); in udp_msg_wait_data()
56 ret = udp_msg_has_data(sk, psock); in udp_msg_wait_data()
66 struct sk_psock *psock; in udp_bpf_recvmsg() local
72 psock = sk_psock_get(sk); in udp_bpf_recvmsg()
73 if (unlikely(!psock)) in udp_bpf_recvmsg()
76 if (!psock_has_data(psock)) { in udp_bpf_recvmsg()
[all …]
/Linux-v5.15/include/linux/
Dskmsg.h102 int (*psock_update_sk_prot)(struct sock *sk, struct sk_psock *psock,
129 int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg,
138 static inline void sk_msg_apply_bytes(struct sk_psock *psock, u32 bytes) in sk_msg_apply_bytes() argument
140 if (psock->apply_bytes) { in sk_msg_apply_bytes()
141 if (psock->apply_bytes < bytes) in sk_msg_apply_bytes()
142 psock->apply_bytes = 0; in sk_msg_apply_bytes()
144 psock->apply_bytes -= bytes; in sk_msg_apply_bytes()
289 static inline void sk_psock_set_state(struct sk_psock *psock, in sk_psock_set_state() argument
292 set_bit(bit, &psock->state); in sk_psock_set_state()
295 static inline void sk_psock_clear_state(struct sk_psock *psock, in sk_psock_clear_state() argument
[all …]
/Linux-v5.15/net/kcm/
Dkcmsock.c53 static void kcm_abort_tx_psock(struct kcm_psock *psock, int err, in kcm_abort_tx_psock() argument
56 struct sock *csk = psock->sk; in kcm_abort_tx_psock()
57 struct kcm_mux *mux = psock->mux; in kcm_abort_tx_psock()
63 if (psock->tx_stopped) { in kcm_abort_tx_psock()
68 psock->tx_stopped = 1; in kcm_abort_tx_psock()
69 KCM_STATS_INCR(psock->stats.tx_aborts); in kcm_abort_tx_psock()
71 if (!psock->tx_kcm) { in kcm_abort_tx_psock()
73 list_del(&psock->psock_avail_list); in kcm_abort_tx_psock()
82 queue_work(kcm_wq, &psock->tx_kcm->tx_work); in kcm_abort_tx_psock()
93 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-v5.15/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()
55 struct sk_psock *psock; in unix_bpf_recvmsg() local
58 psock = sk_psock_get(sk); in unix_bpf_recvmsg()
59 if (unlikely(!psock)) in unix_bpf_recvmsg()
64 sk_psock_queue_empty(psock)) { in unix_bpf_recvmsg()
66 sk_psock_put(sk, psock); in unix_bpf_recvmsg()
71 copied = sk_msg_recvmsg(sk, psock, msg, len, flags); in unix_bpf_recvmsg()
77 data = unix_msg_wait_data(sk, psock, timeo); in unix_bpf_recvmsg()
[all …]
/Linux-v5.15/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-v5.15/net/tls/
Dtls_sw.c801 struct sk_psock *psock; in bpf_exec_tx_verdict() local
809 psock = sk_psock_get(sk); in bpf_exec_tx_verdict()
810 if (!psock || !policy) { in bpf_exec_tx_verdict()
817 if (psock) in bpf_exec_tx_verdict()
818 sk_psock_put(sk, psock); in bpf_exec_tx_verdict()
823 if (psock->eval == __SK_NONE) { in bpf_exec_tx_verdict()
825 psock->eval = sk_psock_msg_verdict(sk, psock, msg); in bpf_exec_tx_verdict()
838 switch (psock->eval) { in bpf_exec_tx_verdict()
849 sk_redir = psock->sk_redir; in bpf_exec_tx_verdict()
890 psock->eval = __SK_NONE; in bpf_exec_tx_verdict()
[all …]
/Linux-v5.15/include/net/
Daf_unix.h104 int unix_dgram_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
105 int unix_stream_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
Dudp.h546 struct proto *udp_bpf_get_proto(struct sock *sk, struct sk_psock *psock);
547 int udp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
Dtcp.h2224 struct proto *tcp_bpf_get_proto(struct sock *sk, struct sk_psock *psock);
2225 int tcp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
Dsock.h1201 struct sk_psock *psock,