Home
last modified time | relevance | path

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

12

/Linux-v4.19/include/net/
Dtimewait_sock.h29 if (sk->sk_prot->twsk_prot->twsk_unique != NULL) in twsk_unique()
30 return sk->sk_prot->twsk_prot->twsk_unique(sk, sktw, twp); in twsk_unique()
36 if (sk->sk_prot->twsk_prot->twsk_destructor != NULL) in twsk_destructor()
37 sk->sk_prot->twsk_prot->twsk_destructor(sk); in twsk_destructor()
Dsock.h357 #define sk_prot __sk_common.skc_prot macro
1172 atomic_inc(&sk->sk_prot->socks); in sk_refcnt_debug_inc()
1177 atomic_dec(&sk->sk_prot->socks); in sk_refcnt_debug_dec()
1179 sk->sk_prot->name, sk, atomic_read(&sk->sk_prot->socks)); in sk_refcnt_debug_dec()
1186 sk->sk_prot->name, sk, refcount_read(&sk->sk_refcnt)); in sk_refcnt_debug_release()
1199 return sk->sk_prot->stream_memory_free ? in sk_stream_memory_free()
1200 sk->sk_prot->stream_memory_free(sk) : true; in sk_stream_memory_free()
1222 return sk->sk_prot->memory_pressure != NULL; in sk_has_memory_pressure()
1227 if (!sk->sk_prot->memory_pressure) in sk_under_memory_pressure()
1234 return !!*sk->sk_prot->memory_pressure; in sk_under_memory_pressure()
[all …]
Drequest_sock.h100 req_to_sk(req)->sk_prot = sk_listener->sk_prot; in reqsk_alloc()
Dinet_sock.h278 sk_from->sk_prot->obj_size - ancestor_size); in __inet_sk_copy_descendant()
/Linux-v4.19/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()
428 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.c107 struct inet_hashinfo *hashinfo = sk->sk_prot->h.hashinfo; in __inet_put_port()
132 struct inet_hashinfo *table = sk->sk_prot->h.hashinfo; in __inet_inherit_port()
490 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in __inet_check_established()
519 struct inet_hashinfo *hashinfo = sk->sk_prot->h.hashinfo; in inet_ehash_insert()
548 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in inet_ehash_nolisten()
550 percpu_counter_inc(sk->sk_prot->orphan_count); in inet_ehash_nolisten()
583 struct inet_hashinfo *hashinfo = sk->sk_prot->h.hashinfo; in __inet_hash()
608 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in __inet_hash()
632 struct inet_hashinfo *hashinfo = sk->sk_prot->h.hashinfo; in inet_unhash()
658 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); in inet_unhash()
Dinet_connection_sock.c179 struct inet_hashinfo *hinfo = sk->sk_prot->h.hashinfo; in inet_csk_find_open_port()
290 struct inet_hashinfo *hinfo = sk->sk_prot->h.hashinfo; in inet_csk_get_port()
652 struct inet_hashinfo *hashinfo = req_to_sk(req)->sk_prot->h.hashinfo; in reqsk_queue_unlink()
838 sk->sk_prot->destroy(sk); in inet_csk_destroy_sock()
846 percpu_counter_dec(sk->sk_prot->orphan_count); in inet_csk_destroy_sock()
864 percpu_counter_inc(sk->sk_prot->orphan_count); in inet_csk_prepare_forced_close()
887 if (!sk->sk_prot->get_port(sk, inet->inet_num)) { in inet_csk_listen_start()
891 err = sk->sk_prot->hash(sk); in inet_csk_listen_start()
905 sk->sk_prot->disconnect(child, O_NONBLOCK); in inet_child_forget()
909 percpu_counter_inc(sk->sk_prot->orphan_count); in inet_child_forget()
Ddatagram.c71 if (sk->sk_prot->rehash) in __ip4_datagram_connect()
72 sk->sk_prot->rehash(sk); in __ip4_datagram_connect()
Draw.c99 struct raw_hashinfo *h = sk->sk_prot->h.raw_hash; in raw_hash_sk()
106 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in raw_hash_sk()
115 struct raw_hashinfo *h = sk->sk_prot->h.raw_hash; in raw_unhash_sk()
119 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); in raw_unhash_sk()
Dinet_timewait_sock.c126 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); in inet_twsk_hashdance()
Dtcp.c492 (sk->sk_prot->stream_memory_read ? in tcp_stream_is_readable()
493 sk->sk_prot->stream_memory_read(sk) : false); in tcp_stream_is_readable()
874 skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp); in sk_stream_alloc_skb()
885 skb_reserve(skb, sk->sk_prot->max_header); in sk_stream_alloc_skb()
896 sk->sk_prot->enter_memory_pressure(sk); in sk_stream_alloc_skb()
2217 sk->sk_prot->unhash(sk); in tcp_set_state()
2356 sk->sk_prot->disconnect(sk, 0); in tcp_close()
2364 sk->sk_prot->disconnect(sk, 0); in tcp_close()
2417 percpu_counter_inc(sk->sk_prot->orphan_count); in tcp_close()
/Linux-v4.19/net/dccp/
Doutput.c467 skb = alloc_skb(sk->sk_prot->max_header, GFP_ATOMIC); in dccp_ctl_make_reset()
471 skb_reserve(skb, sk->sk_prot->max_header); in dccp_ctl_make_reset()
521 skb = sock_wmalloc(sk, sk->sk_prot->max_header, 1, GFP_ATOMIC); in dccp_send_reset()
526 skb_reserve(skb, sk->sk_prot->max_header); in dccp_send_reset()
555 skb = alloc_skb(sk->sk_prot->max_header, sk->sk_allocation); in dccp_connect()
560 skb_reserve(skb, sk->sk_prot->max_header); in dccp_connect()
580 struct sk_buff *skb = alloc_skb(sk->sk_prot->max_header, in dccp_send_ack()
593 skb_reserve(skb, sk->sk_prot->max_header); in dccp_send_ack()
642 struct sk_buff *skb = alloc_skb(sk->sk_prot->max_header, GFP_ATOMIC); in dccp_send_sync()
651 skb_reserve(skb, sk->sk_prot->max_header); in dccp_send_sync()
[all …]
Dproto.c103 sk->sk_prot->unhash(sk); in dccp_set_state()
788 size = sk->sk_prot->max_header + len; in dccp_sendmsg()
800 skb_reserve(skb, sk->sk_prot->max_header); in dccp_sendmsg()
1043 sk->sk_prot->disconnect(sk, 0); in dccp_close()
1080 percpu_counter_inc(sk->sk_prot->orphan_count); in dccp_close()
/Linux-v4.19/net/tls/
Dtls_main.c67 sk->sk_prot = &tls_prots[ip_ver][ctx->tx_conf][ctx->rx_conf]; in update_sk_prot()
574 ctx->hash = sk->sk_prot->hash;
575 ctx->unhash = sk->sk_prot->unhash;
576 ctx->sk_proto_close = sk->sk_prot->close;
688 ctx->setsockopt = sk->sk_prot->setsockopt;
689 ctx->getsockopt = sk->sk_prot->getsockopt;
690 ctx->sk_proto_close = sk->sk_prot->close;
694 unlikely(sk->sk_prot != smp_load_acquire(&saved_tcpv6_prot))) {
696 if (likely(sk->sk_prot != saved_tcpv6_prot)) {
697 build_protos(tls_prots[TLSV6], sk->sk_prot);
[all …]
/Linux-v4.19/net/ieee802154/
Dsocket.c95 sk->sk_prot->close(sk, 0); in ieee802154_sock_release()
105 return sk->sk_prot->sendmsg(sk, msg, len); in ieee802154_sock_sendmsg()
113 if (sk->sk_prot->bind) in ieee802154_sock_bind()
114 return sk->sk_prot->bind(sk, uaddr, addr_len); in ieee802154_sock_bind()
128 return sk->sk_prot->disconnect(sk, flags); in ieee802154_sock_connect()
130 return sk->sk_prot->connect(sk, uaddr, addr_len); in ieee802154_sock_connect()
176 if (!sk->sk_prot->ioctl) in ieee802154_sock_ioctl()
178 return sk->sk_prot->ioctl(sk, cmd, arg); in ieee802154_sock_ioctl()
190 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in raw_hash()
200 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); in raw_unhash()
[all …]
/Linux-v4.19/net/phonet/
Dsocket.c47 sk->sk_prot->close(sk, 0); in pn_socket_release()
178 if (sk->sk_prot->bind) in pn_socket_bind()
179 return sk->sk_prot->bind(sk, addr, len); in pn_socket_bind()
198 err = sk->sk_prot->get_port(sk, pn_port(handle)); in pn_socket_bind()
207 err = sk->sk_prot->hash(sk); in pn_socket_bind()
268 err = sk->sk_prot->connect(sk, addr, len); in pn_socket_connect()
317 newsk = sk->sk_prot->accept(sk, flags, &err, kern); in pn_socket_accept()
404 return sk->sk_prot->ioctl(sk, cmd, arg); in pn_socket_ioctl()
439 return sk->sk_prot->sendmsg(sk, m, total_len); in pn_socket_sendmsg()
Daf_phonet.c109 sk->sk_backlog_rcv = sk->sk_prot->backlog_rcv; in pn_socket_create()
115 sk->sk_prot->init(sk); in pn_socket_create()
/Linux-v4.19/net/core/
Dsock.c761 if (sk->sk_prot->keepalive) in sock_setsockopt()
762 sk->sk_prot->keepalive(sk, valbool); in sock_setsockopt()
1446 osk->sk_prot->obj_size - offsetof(struct sock, sk_dontcopy_end)); in sock_copy()
1529 sk->sk_prot = sk->sk_prot_creator = prot; in sk_alloc()
1654 newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family); in sk_clone_lock()
1660 newsk->sk_prot_creator = sk->sk_prot; in sk_clone_lock()
1746 if (newsk->sk_prot->sockets_allocated) in sk_clone_lock()
2166 if (!sk->sk_prot->enter_memory_pressure) in sk_enter_memory_pressure()
2169 sk->sk_prot->enter_memory_pressure(sk); in sk_enter_memory_pressure()
2174 if (sk->sk_prot->leave_memory_pressure) { in sk_leave_memory_pressure()
[all …]
Dsock_diag.c300 if (!sk->sk_prot->diag_destroy) in sock_diag_destroy()
303 return sk->sk_prot->diag_destroy(sk, err); in sock_diag_destroy()
/Linux-v4.19/net/ipv6/
Daf_inet6.c105 const int offset = sk->sk_prot->obj_size - sizeof(struct ipv6_pinfo); in inet6_sk_generic()
248 err = sk->sk_prot->hash(sk); in inet6_create()
254 if (sk->sk_prot->init) { in inet6_create()
255 err = sk->sk_prot->init(sk); in inet6_create()
390 if (sk->sk_prot->get_port(sk, snum)) { in __inet6_bind()
427 if (sk->sk_prot->bind) in inet6_bind()
428 return sk->sk_prot->bind(sk, uaddr, addr_len); in inet6_bind()
553 if (!sk->sk_prot->ioctl) in inet6_ioctl()
555 return sk->sk_prot->ioctl(sk, cmd, arg); in inet6_ioctl()
Ddatagram.c104 if (sk->sk_prot->rehash) in ip6_datagram_dst_update()
105 sk->sk_prot->rehash(sk); in ip6_datagram_dst_update()
209 if (sk->sk_prot->rehash) in __ip6_datagram_connect()
210 sk->sk_prot->rehash(sk); in __ip6_datagram_connect()
Dipv6_sockglue.c215 sock_prot_inuse_add(net, sk->sk_prot, -1); in do_ipv6_setsockopt()
218 sk->sk_prot = &tcp_prot; in do_ipv6_setsockopt()
229 sock_prot_inuse_add(net, sk->sk_prot, -1); in do_ipv6_setsockopt()
232 sk->sk_prot = prot; in do_ipv6_setsockopt()
/Linux-v4.19/net/smc/
Daf_smc.c56 smc->clcsock->sk->sk_prot->keepalive(smc->clcsock->sk, val); in smc_set_keepalive()
69 struct smc_hashinfo *h = sk->sk_prot->h.smc_hash; in smc_hash_sk()
76 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); in smc_hash_sk()
85 struct smc_hashinfo *h = sk->sk_prot->h.smc_hash; in smc_unhash_sk()
89 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); in smc_unhash_sk()
165 sk->sk_prot->unhash(sk); in smc_release()
204 sk->sk_prot->hash(sk); in smc_sock_alloc()
843 new_sk->sk_prot->unhash(new_sk); in smc_clcsock_accept()
898 new_sk->sk_prot->unhash(new_sk); in smc_accept_dequeue()
938 sk->sk_prot->unhash(sk); in smc_close_non_accepted()
/Linux-v4.19/kernel/bpf/
Dsockmap.c204 sk->sk_prot = &bpf_tcp_prots[family][conf]; in update_sk_prot()
223 psock->save_unhash = sk->sk_prot->unhash; in bpf_tcp_init()
224 psock->save_close = sk->sk_prot->close; in bpf_tcp_init()
225 psock->sk_proto = sk->sk_prot; in bpf_tcp_init()
229 unlikely(sk->sk_prot != smp_load_acquire(&saved_tcpv6_prot))) { in bpf_tcp_init()
231 if (likely(sk->sk_prot != saved_tcpv6_prot)) { in bpf_tcp_init()
232 build_protos(bpf_tcp_prots[SOCKMAP_IPV6], sk->sk_prot); in bpf_tcp_init()
233 smp_store_release(&saved_tcpv6_prot, sk->sk_prot); in bpf_tcp_init()
261 sk->sk_prot = psock->sk_proto; in bpf_tcp_release()
379 if (sk->sk_prot->unhash) in bpf_tcp_unhash()
[all …]
/Linux-v4.19/drivers/crypto/chelsio/chtls/
Dchtls_cm.h103 #define INC_ORPHAN_COUNT(sk) percpu_counter_inc((sk)->sk_prot->orphan_count)

12