Home
last modified time | relevance | path

Searched refs:sk_prot (Results 1 – 25 of 47) sorted by relevance

12

/Linux-v5.4/include/net/
Dtimewait_sock.h25 if (sk->sk_prot->twsk_prot->twsk_unique != NULL) in twsk_unique()
26 return sk->sk_prot->twsk_prot->twsk_unique(sk, sktw, twp); in twsk_unique()
32 if (sk->sk_prot->twsk_prot->twsk_destructor != NULL) in twsk_destructor()
33 sk->sk_prot->twsk_prot->twsk_destructor(sk); in twsk_destructor()
Dsock.h355 #define sk_prot __sk_common.skc_prot macro
1191 atomic_inc(&sk->sk_prot->socks); in sk_refcnt_debug_inc()
1196 atomic_dec(&sk->sk_prot->socks); in sk_refcnt_debug_dec()
1198 sk->sk_prot->name, sk, atomic_read(&sk->sk_prot->socks)); in sk_refcnt_debug_dec()
1205 sk->sk_prot->name, sk, refcount_read(&sk->sk_refcnt)); in sk_refcnt_debug_release()
1218 return sk->sk_prot->stream_memory_free ? in __sk_stream_memory_free()
1219 sk->sk_prot->stream_memory_free(sk, wake) : true; in __sk_stream_memory_free()
1251 return sk->sk_prot->memory_pressure != NULL; in sk_has_memory_pressure()
1256 if (!sk->sk_prot->memory_pressure) in sk_under_memory_pressure()
1263 return !!*sk->sk_prot->memory_pressure; in sk_under_memory_pressure()
[all …]
Drequest_sock.h96 req_to_sk(req)->sk_prot = sk_listener->sk_prot; in reqsk_alloc()
/Linux-v5.4/net/dccp/
Doutput.c463 skb = alloc_skb(sk->sk_prot->max_header, GFP_ATOMIC); in dccp_ctl_make_reset()
467 skb_reserve(skb, sk->sk_prot->max_header); in dccp_ctl_make_reset()
517 skb = sock_wmalloc(sk, sk->sk_prot->max_header, 1, GFP_ATOMIC); in dccp_send_reset()
522 skb_reserve(skb, sk->sk_prot->max_header); in dccp_send_reset()
551 skb = alloc_skb(sk->sk_prot->max_header, sk->sk_allocation); in dccp_connect()
556 skb_reserve(skb, sk->sk_prot->max_header); in dccp_connect()
576 struct sk_buff *skb = alloc_skb(sk->sk_prot->max_header, in dccp_send_ack()
589 skb_reserve(skb, sk->sk_prot->max_header); in dccp_send_ack()
638 struct sk_buff *skb = alloc_skb(sk->sk_prot->max_header, GFP_ATOMIC); in dccp_send_sync()
647 skb_reserve(skb, sk->sk_prot->max_header); in dccp_send_sync()
[all …]
Dproto.c100 sk->sk_prot->unhash(sk); in dccp_set_state()
784 size = sk->sk_prot->max_header + len; in dccp_sendmsg()
796 skb_reserve(skb, sk->sk_prot->max_header); in dccp_sendmsg()
1039 sk->sk_prot->disconnect(sk, 0); in dccp_close()
1076 percpu_counter_inc(sk->sk_prot->orphan_count); in dccp_close()
/Linux-v5.4/net/ipv4/
Daf_inet.c182 if (sk->sk_prot->get_port(sk, 0)) { in inet_autobind()
351 sk->sk_backlog_rcv = sk->sk_prot->backlog_rcv; in inet_create()
371 err = sk->sk_prot->hash(sk); in inet_create()
378 if (sk->sk_prot->init) { in inet_create()
379 err = sk->sk_prot->init(sk); in inet_create()
427 sk->sk_prot->close(sk, timeout); in inet_release()
440 if (sk->sk_prot->bind) { in inet_bind()
441 return sk->sk_prot->bind(sk, uaddr, addr_len); in inet_bind()
524 if (sk->sk_prot->get_port(sk, snum)) { in __inet_bind()
561 return sk->sk_prot->disconnect(sk, flags); in inet_dgram_connect()
[all …]
Dinet_hashtables.c105 struct inet_hashinfo *hashinfo = sk->sk_prot->h.hashinfo; in __inet_put_port()
130 struct inet_hashinfo *table = sk->sk_prot->h.hashinfo; in __inet_inherit_port()
446 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in __inet_check_established()
475 struct inet_hashinfo *hashinfo = sk->sk_prot->h.hashinfo; in inet_ehash_insert()
504 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in inet_ehash_nolisten()
506 percpu_counter_inc(sk->sk_prot->orphan_count); in inet_ehash_nolisten()
539 struct inet_hashinfo *hashinfo = sk->sk_prot->h.hashinfo; in __inet_hash()
564 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in __inet_hash()
588 struct inet_hashinfo *hashinfo = sk->sk_prot->h.hashinfo; in inet_unhash()
614 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); in inet_unhash()
Dinet_connection_sock.c175 struct inet_hashinfo *hinfo = sk->sk_prot->h.hashinfo; in inet_csk_find_open_port()
289 struct inet_hashinfo *hinfo = sk->sk_prot->h.hashinfo; in inet_csk_get_port()
654 struct inet_hashinfo *hashinfo = req_to_sk(req)->sk_prot->h.hashinfo; in reqsk_queue_unlink()
836 sk->sk_prot->destroy(sk); in inet_csk_destroy_sock()
844 percpu_counter_dec(sk->sk_prot->orphan_count); in inet_csk_destroy_sock()
862 percpu_counter_inc(sk->sk_prot->orphan_count); in inet_csk_prepare_forced_close()
884 if (!sk->sk_prot->get_port(sk, inet->inet_num)) { in inet_csk_listen_start()
888 err = sk->sk_prot->hash(sk); in inet_csk_listen_start()
902 sk->sk_prot->disconnect(child, O_NONBLOCK); in inet_child_forget()
906 percpu_counter_inc(sk->sk_prot->orphan_count); in inet_child_forget()
Ddatagram.c68 if (sk->sk_prot->rehash) in __ip4_datagram_connect()
69 sk->sk_prot->rehash(sk); in __ip4_datagram_connect()
Dtcp_bpf.c553 if (sk->sk_prot->unhash) in tcp_bpf_unhash()
554 sk->sk_prot->unhash(sk); in tcp_bpf_unhash()
575 return sk->sk_prot->close(sk, timeout); in tcp_bpf_close()
652 sk->sk_prot = &tcp_bpf_prots[family][config]; in tcp_bpf_reinit_sk_prot()
680 struct proto *ops = READ_ONCE(sk->sk_prot); in tcp_bpf_init()
Dtcp_ulp.c104 sk->sk_prot = proto; in tcp_update_ulp()
Draw.c95 struct raw_hashinfo *h = sk->sk_prot->h.raw_hash; in raw_hash_sk()
102 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in raw_hash_sk()
111 struct raw_hashinfo *h = sk->sk_prot->h.raw_hash; in raw_unhash_sk()
115 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); in raw_unhash_sk()
/Linux-v5.4/net/ieee802154/
Dsocket.c87 sk->sk_prot->close(sk, 0); in ieee802154_sock_release()
97 return sk->sk_prot->sendmsg(sk, msg, len); in ieee802154_sock_sendmsg()
105 if (sk->sk_prot->bind) in ieee802154_sock_bind()
106 return sk->sk_prot->bind(sk, uaddr, addr_len); in ieee802154_sock_bind()
120 return sk->sk_prot->disconnect(sk, flags); in ieee802154_sock_connect()
122 return sk->sk_prot->connect(sk, uaddr, addr_len); in ieee802154_sock_connect()
164 if (!sk->sk_prot->ioctl) in ieee802154_sock_ioctl()
166 return sk->sk_prot->ioctl(sk, cmd, arg); in ieee802154_sock_ioctl()
178 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in raw_hash()
188 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); in raw_unhash()
[all …]
/Linux-v5.4/net/tls/
Dtls_main.c72 sk->sk_prot = &tls_prots[ip_ver][ctx->tx_conf][ctx->rx_conf]; in update_sk_prot()
319 sk->sk_prot = ctx->sk_proto; in tls_sk_proto_close()
618 ctx->sk_proto = sk->sk_prot; in create_ctx()
628 unlikely(sk->sk_prot != smp_load_acquire(&saved_tcpv6_prot))) { in tls_build_proto()
630 if (likely(sk->sk_prot != saved_tcpv6_prot)) { in tls_build_proto()
631 build_protos(tls_prots[TLSV6], sk->sk_prot); in tls_build_proto()
632 smp_store_release(&saved_tcpv6_prot, sk->sk_prot); in tls_build_proto()
638 unlikely(sk->sk_prot != smp_load_acquire(&saved_tcpv4_prot))) { in tls_build_proto()
640 if (likely(sk->sk_prot != saved_tcpv4_prot)) { in tls_build_proto()
641 build_protos(tls_prots[TLSV4], sk->sk_prot); in tls_build_proto()
[all …]
/Linux-v5.4/net/phonet/
Dsocket.c34 sk->sk_prot->close(sk, 0); in pn_socket_release()
165 if (sk->sk_prot->bind) in pn_socket_bind()
166 return sk->sk_prot->bind(sk, addr, len); in pn_socket_bind()
185 err = sk->sk_prot->get_port(sk, pn_port(handle)); in pn_socket_bind()
194 err = sk->sk_prot->hash(sk); in pn_socket_bind()
255 err = sk->sk_prot->connect(sk, addr, len); in pn_socket_connect()
304 newsk = sk->sk_prot->accept(sk, flags, &err, kern); in pn_socket_accept()
391 return sk->sk_prot->ioctl(sk, cmd, arg); in pn_socket_ioctl()
426 return sk->sk_prot->sendmsg(sk, m, total_len); in pn_socket_sendmsg()
Daf_phonet.c96 sk->sk_backlog_rcv = sk->sk_prot->backlog_rcv; in pn_socket_create()
102 sk->sk_prot->init(sk); in pn_socket_create()
/Linux-v5.4/include/linux/
Dskmsg.h346 psock->saved_unhash = sk->sk_prot->unhash; in sk_psock_update_proto()
347 psock->saved_close = sk->sk_prot->close; in sk_psock_update_proto()
350 psock->sk_proto = sk->sk_prot; in sk_psock_update_proto()
351 sk->sk_prot = ops; in sk_psock_update_proto()
366 sk->sk_prot = psock->sk_proto; in sk_psock_restore_proto()
396 if (sk->sk_prot->recvmsg != tcp_bpf_recvmsg) { in sk_psock_get_checked()
/Linux-v5.4/net/ipv6/
Daf_inet6.c102 const int offset = sk->sk_prot->obj_size - sizeof(struct ipv6_pinfo); in inet6_sk_generic()
246 err = sk->sk_prot->hash(sk); in inet6_create()
252 if (sk->sk_prot->init) { in inet6_create()
253 err = sk->sk_prot->init(sk); in inet6_create()
403 if (sk->sk_prot->get_port(sk, snum)) { in __inet6_bind()
440 if (sk->sk_prot->bind) in inet6_bind()
441 return sk->sk_prot->bind(sk, uaddr, addr_len); in inet6_bind()
558 if (!sk->sk_prot->ioctl) in inet6_ioctl()
560 return sk->sk_prot->ioctl(sk, cmd, arg); in inet6_ioctl()
576 return INDIRECT_CALL_2(sk->sk_prot->sendmsg, tcp_sendmsg, udpv6_sendmsg, in inet6_sendmsg()
[all …]
Ddatagram.c101 if (sk->sk_prot->rehash) in ip6_datagram_dst_update()
102 sk->sk_prot->rehash(sk); in ip6_datagram_dst_update()
206 if (sk->sk_prot->rehash) in __ip6_datagram_connect()
207 sk->sk_prot->rehash(sk); in __ip6_datagram_connect()
Dipv6_sockglue.c213 sock_prot_inuse_add(net, sk->sk_prot, -1); in do_ipv6_setsockopt()
216 sk->sk_prot = &tcp_prot; in do_ipv6_setsockopt()
227 sock_prot_inuse_add(net, sk->sk_prot, -1); in do_ipv6_setsockopt()
230 sk->sk_prot = prot; in do_ipv6_setsockopt()
/Linux-v5.4/net/core/
Dsock.c588 if (sk->sk_prot->rehash) in sock_setbindtodevice_locked()
589 sk->sk_prot->rehash(sk); in sock_setbindtodevice_locked()
853 if (sk->sk_prot->keepalive) in sock_setsockopt()
854 sk->sk_prot->keepalive(sk, valbool); in sock_setsockopt()
1583 osk->sk_prot->obj_size - offsetof(struct sock, sk_dontcopy_end)); in sock_copy()
1666 sk->sk_prot = sk->sk_prot_creator = prot; in sk_alloc()
1800 newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family); in sk_clone_lock()
1806 newsk->sk_prot_creator = sk->sk_prot; in sk_clone_lock()
1897 if (newsk->sk_prot->sockets_allocated) in sk_clone_lock()
2328 if (!sk->sk_prot->enter_memory_pressure) in sk_enter_memory_pressure()
[all …]
Dsock_diag.c301 if (!sk->sk_prot->diag_destroy) in sock_diag_destroy()
304 return sk->sk_prot->diag_destroy(sk, err); in sock_diag_destroy()
/Linux-v5.4/net/smc/
Daf_smc.c64 smc->clcsock->sk->sk_prot->keepalive(smc->clcsock->sk, val); in smc_set_keepalive()
77 struct smc_hashinfo *h = sk->sk_prot->h.smc_hash; in smc_hash_sk()
84 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in smc_hash_sk()
93 struct smc_hashinfo *h = sk->sk_prot->h.smc_hash; in smc_unhash_sk()
97 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); in smc_unhash_sk()
153 sk->sk_prot->unhash(sk); in __smc_release()
237 sk->sk_prot->hash(sk); in smc_sock_alloc()
901 new_sk->sk_prot->unhash(new_sk); in smc_clcsock_accept()
956 new_sk->sk_prot->unhash(new_sk); in smc_accept_dequeue()
/Linux-v5.4/drivers/crypto/chelsio/chtls/
Dchtls_cm.h100 #define INC_ORPHAN_COUNT(sk) percpu_counter_inc((sk)->sk_prot->orphan_count)
/Linux-v5.4/net/can/
Daf_can.c167 if (sk->sk_prot->init) in can_create()
168 err = sk->sk_prot->init(sk); in can_create()

12