Home
last modified time | relevance | path

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

/Linux-v6.1/net/core/
Dskmsg.c411 int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg, in sk_msg_recvmsg() argument
419 msg_rx = sk_psock_peek_msg(psock); in sk_msg_recvmsg()
469 msg_rx = sk_psock_next_msg(psock, msg_rx); in sk_msg_recvmsg()
477 msg_rx = sk_psock_dequeue_msg(psock); in sk_msg_recvmsg()
480 msg_rx = sk_psock_peek_msg(psock); in sk_msg_recvmsg()
483 if (psock->work_state.skb && copied > 0) in sk_msg_recvmsg()
484 schedule_work(&psock->work); in sk_msg_recvmsg()
491 struct sk_psock *psock; in sk_msg_is_readable() local
495 psock = sk_psock(sk); in sk_msg_is_readable()
496 if (likely(psock)) in sk_msg_is_readable()
[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-v6.1/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()
144 ret = ingress ? bpf_tcp_ingress(sk, psock, msg, bytes, flags) : in tcp_bpf_sendmsg_redir()
146 sk_psock_put(sk, psock); in tcp_bpf_sendmsg_redir()
152 static int tcp_msg_wait_data(struct sock *sk, struct sk_psock *psock, in tcp_msg_wait_data() argument
167 !list_empty(&psock->ingress_msg) || in tcp_msg_wait_data()
180 struct sk_psock *psock; in tcp_bpf_recvmsg_parser() local
[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
71 psock = sk_psock_get(sk); in udp_bpf_recvmsg()
72 if (unlikely(!psock)) in udp_bpf_recvmsg()
75 if (!psock_has_data(psock)) { in udp_bpf_recvmsg()
[all …]
/Linux-v6.1/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()
285 static inline void sk_psock_set_state(struct sk_psock *psock, in sk_psock_set_state() argument
288 set_bit(bit, &psock->state); in sk_psock_set_state()
291 static inline void sk_psock_clear_state(struct sk_psock *psock, in sk_psock_clear_state() argument
[all …]
/Linux-v6.1/net/kcm/
Dkcmsock.c54 static void kcm_abort_tx_psock(struct kcm_psock *psock, int err, in kcm_abort_tx_psock() argument
57 struct sock *csk = psock->sk; in kcm_abort_tx_psock()
58 struct kcm_mux *mux = psock->mux; in kcm_abort_tx_psock()
64 if (psock->tx_stopped) { in kcm_abort_tx_psock()
69 psock->tx_stopped = 1; in kcm_abort_tx_psock()
70 KCM_STATS_INCR(psock->stats.tx_aborts); in kcm_abort_tx_psock()
72 if (!psock->tx_kcm) { in kcm_abort_tx_psock()
74 list_del(&psock->psock_avail_list); in kcm_abort_tx_psock()
83 queue_work(kcm_wq, &psock->tx_kcm->tx_work); in kcm_abort_tx_psock()
94 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-v6.1/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
57 psock = sk_psock_get(sk); in unix_bpf_recvmsg()
58 if (unlikely(!psock)) in unix_bpf_recvmsg()
63 sk_psock_queue_empty(psock)) { in unix_bpf_recvmsg()
65 sk_psock_put(sk, psock); in unix_bpf_recvmsg()
70 copied = sk_msg_recvmsg(sk, psock, msg, len, flags); in unix_bpf_recvmsg()
76 data = unix_msg_wait_data(sk, psock, timeo); in unix_bpf_recvmsg()
[all …]
/Linux-v6.1/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-v6.1/net/tls/
Dtls_sw.c792 struct sk_psock *psock; in bpf_exec_tx_verdict() local
800 psock = sk_psock_get(sk); in bpf_exec_tx_verdict()
801 if (!psock || !policy) { in bpf_exec_tx_verdict()
808 if (psock) in bpf_exec_tx_verdict()
809 sk_psock_put(sk, psock); in bpf_exec_tx_verdict()
814 if (psock->eval == __SK_NONE) { in bpf_exec_tx_verdict()
816 psock->eval = sk_psock_msg_verdict(sk, psock, msg); in bpf_exec_tx_verdict()
829 switch (psock->eval) { in bpf_exec_tx_verdict()
840 sk_redir = psock->sk_redir; in bpf_exec_tx_verdict()
881 psock->eval = __SK_NONE; in bpf_exec_tx_verdict()
[all …]
/Linux-v6.1/include/net/
Daf_unix.h102 int unix_dgram_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
103 int unix_stream_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
Dudp.h522 struct proto *udp_bpf_get_proto(struct sock *sk, struct sk_psock *psock);
523 int udp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
Dtcp.h2289 struct proto *tcp_bpf_get_proto(struct sock *sk, struct sk_psock *psock);
2290 int tcp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
Dsock.h1286 struct sk_psock *psock,