Home
last modified time | relevance | path

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

/Linux-v5.4/drivers/isdn/mISDN/
Ddsp_dtmf.c123 s32 sk, sk1, sk2; in dsp_dtmf_goertzel_decode() local
159 sk2 = (*hfccoeff++) >> 4; in dsp_dtmf_goertzel_decode()
161 if (sk > 32767 || sk < -32767 || sk2 > 32767 in dsp_dtmf_goertzel_decode()
162 || sk2 < -32767) in dsp_dtmf_goertzel_decode()
168 (((cos2pik[k] * sk) >> 15) * sk2) + in dsp_dtmf_goertzel_decode()
169 (sk2 * sk2); in dsp_dtmf_goertzel_decode()
187 sk2 = 0; in dsp_dtmf_goertzel_decode()
191 sk = ((cos2pik_ * sk1) >> 15) - sk2 + (*buf++); in dsp_dtmf_goertzel_decode()
192 sk2 = sk1; in dsp_dtmf_goertzel_decode()
196 sk2 >>= 8; in dsp_dtmf_goertzel_decode()
[all …]
/Linux-v5.4/net/core/
Dsock_reuseport.c151 int reuseport_add_sock(struct sock *sk, struct sock *sk2, bool bind_inany) in reuseport_add_sock() argument
155 if (!rcu_access_pointer(sk2->sk_reuseport_cb)) { in reuseport_add_sock()
156 int err = reuseport_alloc(sk2, bind_inany); in reuseport_add_sock()
163 reuse = rcu_dereference_protected(sk2->sk_reuseport_cb, in reuseport_add_sock()
272 struct sock *sk2 = NULL; in reuseport_select_sock() local
292 sk2 = bpf_run_sk_reuseport(reuse, sk, prog, skb, hash); in reuseport_select_sock()
294 sk2 = run_bpf_filter(reuse, socks, prog, skb, hdr_len); in reuseport_select_sock()
298 if (!sk2) { in reuseport_select_sock()
309 sk2 = reuse->socks[i]; in reuseport_select_sock()
315 return sk2; in reuseport_select_sock()
/Linux-v5.4/net/ipv4/
Dinet_hashtables.c412 struct sock *sk2; in __inet_check_established() local
418 sk_nulls_for_each(sk2, node, &head->chain) { in __inet_check_established()
419 if (sk2->sk_hash != hash) in __inet_check_established()
422 if (likely(INET_MATCH(sk2, net, acookie, in __inet_check_established()
424 if (sk2->sk_state == TCP_TIME_WAIT) { in __inet_check_established()
425 tw = inet_twsk(sk2); in __inet_check_established()
426 if (twsk_unique(sk, sk2, twp)) in __inet_check_established()
519 struct sock *sk2; in inet_reuseport_add_sock() local
522 sk_for_each_rcu(sk2, &ilb->head) { in inet_reuseport_add_sock()
523 if (sk2 != sk && in inet_reuseport_add_sock()
[all …]
Dinet_connection_sock.c88 bool inet_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2, in inet_rcv_saddr_equal() argument
94 inet6_rcv_saddr(sk2), in inet_rcv_saddr_equal()
96 sk2->sk_rcv_saddr, in inet_rcv_saddr_equal()
98 ipv6_only_sock(sk2), in inet_rcv_saddr_equal()
101 return ipv4_rcv_saddr_equal(sk->sk_rcv_saddr, sk2->sk_rcv_saddr, in inet_rcv_saddr_equal()
102 ipv6_only_sock(sk2), match_wildcard); in inet_rcv_saddr_equal()
132 struct sock *sk2; in inet_csk_bind_conflict() local
144 sk_for_each_bound(sk2, &tb->owners) { in inet_csk_bind_conflict()
145 if (sk != sk2 && in inet_csk_bind_conflict()
147 !sk2->sk_bound_dev_if || in inet_csk_bind_conflict()
[all …]
Dudp.c133 struct sock *sk2; in udp_lib_lport_inuse() local
136 sk_for_each(sk2, &hslot->head) { in udp_lib_lport_inuse()
137 if (net_eq(sock_net(sk2), net) && in udp_lib_lport_inuse()
138 sk2 != sk && in udp_lib_lport_inuse()
139 (bitmap || udp_sk(sk2)->udp_port_hash == num) && in udp_lib_lport_inuse()
140 (!sk2->sk_reuse || !sk->sk_reuse) && in udp_lib_lport_inuse()
141 (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if || in udp_lib_lport_inuse()
142 sk2->sk_bound_dev_if == sk->sk_bound_dev_if) && in udp_lib_lport_inuse()
143 inet_rcv_saddr_equal(sk, sk2, true)) { in udp_lib_lport_inuse()
144 if (sk2->sk_reuseport && sk->sk_reuseport && in udp_lib_lport_inuse()
[all …]
Dping.c82 struct sock *sk2 = NULL; in ping_get_port() local
95 ping_portaddr_for_each_entry(sk2, node, hlist) { in ping_get_port()
96 isk2 = inet_sk(sk2); in ping_get_port()
112 ping_portaddr_for_each_entry(sk2, node, hlist) { in ping_get_port()
113 isk2 = inet_sk(sk2); in ping_get_port()
120 (sk2 != sk) && in ping_get_port()
121 (!sk2->sk_reuse || !sk->sk_reuse)) in ping_get_port()
Daf_inet.c734 struct sock *sk2 = sk1->sk_prot->accept(sk1, flags, &err, kern); in inet_accept() local
736 if (!sk2) in inet_accept()
739 lock_sock(sk2); in inet_accept()
741 sock_rps_record_flow(sk2); in inet_accept()
742 WARN_ON(!((1 << sk2->sk_state) & in inet_accept()
746 sock_graft(sk2, newsock); in inet_accept()
750 release_sock(sk2); in inet_accept()
Dtcp_ipv4.c2001 struct sock *sk2 = inet_lookup_listener(dev_net(skb->dev), in tcp_v4_rcv() local
2008 if (sk2) { in tcp_v4_rcv()
2010 sk = sk2; in tcp_v4_rcv()
/Linux-v5.4/net/ipv6/
Dinet6_hashtables.c216 struct sock *sk2; in __inet6_check_established() local
222 sk_nulls_for_each(sk2, node, &head->chain) { in __inet6_check_established()
223 if (sk2->sk_hash != hash) in __inet6_check_established()
226 if (likely(INET6_MATCH(sk2, net, saddr, daddr, ports, in __inet6_check_established()
228 if (sk2->sk_state == TCP_TIME_WAIT) { in __inet6_check_established()
229 tw = inet_twsk(sk2); in __inet6_check_established()
230 if (twsk_unique(sk, sk2, twp)) in __inet6_check_established()
Dtcp_ipv6.c1665 struct sock *sk2; in tcp_v6_rcv() local
1667 sk2 = inet6_lookup_listener(dev_net(skb->dev), &tcp_hashinfo, in tcp_v6_rcv()
1674 if (sk2) { in tcp_v6_rcv()
1677 sk = sk2; in tcp_v6_rcv()
/Linux-v5.4/net/ipv4/netfilter/
Dnf_tproxy_ipv4.c34 struct sock *sk2; in nf_tproxy_handle_time_wait4() local
36 sk2 = nf_tproxy_get_sock_v4(net, skb, iph->protocol, in nf_tproxy_handle_time_wait4()
40 if (sk2) { in nf_tproxy_handle_time_wait4()
42 sk = sk2; in nf_tproxy_handle_time_wait4()
/Linux-v5.4/net/ipv6/netfilter/
Dnf_tproxy_ipv6.c57 struct sock *sk2; in nf_tproxy_handle_time_wait6() local
59 sk2 = nf_tproxy_get_sock_v6(net, skb, thoff, tproto, in nf_tproxy_handle_time_wait6()
65 if (sk2) { in nf_tproxy_handle_time_wait6()
67 sk = sk2; in nf_tproxy_handle_time_wait6()
/Linux-v5.4/crypto/
Daf_alg.c273 struct sock *sk2; in af_alg_accept() local
284 sk2 = sk_alloc(sock_net(sk), PF_ALG, GFP_KERNEL, &alg_proto, kern); in af_alg_accept()
286 if (!sk2) in af_alg_accept()
289 sock_init_data(newsock, sk2); in af_alg_accept()
290 security_sock_graft(sk2, newsock); in af_alg_accept()
291 security_sk_clone(sk, sk2); in af_alg_accept()
293 err = type->accept(ask->private, sk2); in af_alg_accept()
297 err = type->accept_nokey(ask->private, sk2); in af_alg_accept()
305 alg_sk(sk2)->parent = sk; in af_alg_accept()
306 alg_sk(sk2)->type = type; in af_alg_accept()
[all …]
Dalgif_hash.c238 struct sock *sk2; in hash_accept() local
256 sk2 = newsock->sk; in hash_accept()
257 ask2 = alg_sk(sk2); in hash_accept()
266 sock_orphan(sk2); in hash_accept()
267 sock_put(sk2); in hash_accept()
/Linux-v5.4/net/sctp/
Dinput.c739 struct sock *sk2 = epb2->sk; in __sctp_hash_endpoint() local
741 if (!net_eq(sock_net(sk2), net) || sk2 == sk || in __sctp_hash_endpoint()
742 !uid_eq(sock_i_uid(sk2), sock_i_uid(sk)) || in __sctp_hash_endpoint()
743 !sk2->sk_reuseport) in __sctp_hash_endpoint()
746 err = sctp_bind_addrs_check(sctp_sk(sk2), in __sctp_hash_endpoint()
749 err = reuseport_add_sock(sk, sk2, any); in __sctp_hash_endpoint()
Dsocket.c8227 struct sock *sk2; in sctp_get_port_local() local
8247 sk_for_each_bound(sk2, &pp->owner) { in sctp_get_port_local()
8248 struct sctp_sock *sp2 = sctp_sk(sk2); in sctp_get_port_local()
8251 if (sk == sk2 || in sctp_get_port_local()
8252 (reuse && (sk2->sk_reuse || sp2->reuse) && in sctp_get_port_local()
8253 sk2->sk_state != SCTP_SS_LISTENING) || in sctp_get_port_local()
8254 (sk->sk_reuseport && sk2->sk_reuseport && in sctp_get_port_local()
8255 uid_eq(uid, sock_i_uid(sk2)))) in sctp_get_port_local()
/Linux-v5.4/include/net/
Dsock_reuseport.h31 extern int reuseport_add_sock(struct sock *sk, struct sock *sk2,
Daddrconf.h110 bool inet_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2,
/Linux-v5.4/net/unix/
Daf_unix.c1074 static void unix_state_double_lock(struct sock *sk1, struct sock *sk2) in unix_state_double_lock() argument
1076 if (unlikely(sk1 == sk2) || !sk2) { in unix_state_double_lock()
1080 if (sk1 < sk2) { in unix_state_double_lock()
1082 unix_state_lock_nested(sk2); in unix_state_double_lock()
1084 unix_state_lock(sk2); in unix_state_double_lock()
1089 static void unix_state_double_unlock(struct sock *sk1, struct sock *sk2) in unix_state_double_unlock() argument
1091 if (unlikely(sk1 == sk2) || !sk2) { in unix_state_double_unlock()
1096 unix_state_unlock(sk2); in unix_state_double_unlock()
/Linux-v5.4/net/decnet/
Ddn_nsp_in.c710 static int dn_nsp_rx_packet(struct net *net, struct sock *sk2, in dn_nsp_rx_packet() argument