Home
last modified time | relevance | path

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

12

/drivers/isdn/mISDN/
Dsocket.c31 #define _pms(sk) ((struct mISDN_sock *)sk) argument
55 mISDN_sock_link(struct mISDN_sock_list *l, struct sock *sk) in mISDN_sock_link() argument
58 sk_add_node(sk, &l->head); in mISDN_sock_link()
62 static void mISDN_sock_unlink(struct mISDN_sock_list *l, struct sock *sk) in mISDN_sock_unlink() argument
65 sk_del_node_init(sk); in mISDN_sock_unlink()
78 if (msk->sk.sk_state == MISDN_CLOSED) in mISDN_send()
81 err = sock_queue_rcv_skb(&msk->sk, skb); in mISDN_send()
97 msk->sk.sk_state = MISDN_CLOSED; in mISDN_ctrl()
104 mISDN_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_buff *skb) in mISDN_sock_cmsg() argument
108 if (_pms(sk)->cmask & MISDN_TIME_STAMP) { in mISDN_sock_cmsg()
[all …]
Ddsp_dtmf.c123 s32 sk, sk1, sk2; in dsp_dtmf_goertzel_decode() local
160 sk = (*hfccoeff++) >> 4; in dsp_dtmf_goertzel_decode()
161 if (sk > 32767 || sk < -32767 || sk2 > 32767 in dsp_dtmf_goertzel_decode()
167 (sk * sk) - in dsp_dtmf_goertzel_decode()
168 (((cos2pik[k] * sk) >> 15) * sk2) + in dsp_dtmf_goertzel_decode()
185 sk = 0; in dsp_dtmf_goertzel_decode()
191 sk = ((cos2pik_ * sk1) >> 15) - sk2 + (*buf++); in dsp_dtmf_goertzel_decode()
193 sk1 = sk; in dsp_dtmf_goertzel_decode()
195 sk >>= 8; in dsp_dtmf_goertzel_decode()
197 if (sk > 32767 || sk < -32767 || sk2 > 32767 || sk2 < -32767) in dsp_dtmf_goertzel_decode()
[all …]
Dstack.c67 struct sock *sk; in send_socklist() local
71 sk_for_each(sk, &sl->head) { in send_socklist()
72 if (sk->sk_state != MISDN_BOUND) in send_socklist()
80 if (!sock_queue_rcv_skb(sk, cskb)) in send_socklist()
453 sk_add_node(&msk->sk, &dev->D.st->l1sock.head); in connect_layer1()
594 sk_del_node_init(&msk->sk); in delete_channel()
/drivers/net/ppp/
Dpppoe.c92 static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb);
289 struct sock *sk; in pppoe_flush_dev() local
299 sk = sk_pppox(po); in pppoe_flush_dev()
309 sock_hold(sk); in pppoe_flush_dev()
311 lock_sock(sk); in pppoe_flush_dev()
314 sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) { in pppoe_flush_dev()
315 pppox_unbind_sock(sk); in pppoe_flush_dev()
316 sk->sk_state_change(sk); in pppoe_flush_dev()
321 release_sock(sk); in pppoe_flush_dev()
322 sock_put(sk); in pppoe_flush_dev()
[all …]
Dpppopns.c72 struct sock *sk = (struct sock *)sk_raw->sk_user_data; in pppopns_recv_core() local
73 struct pppopns_opt *opt = &pppox_sk(sk)->proto.pns; in pppopns_recv_core()
126 skb_set_owner_r(skb, sk); in pppopns_recv_core()
127 skb_queue_walk(&sk->sk_receive_queue, skb1) { in pppopns_recv_core()
134 skb_insert(skb1, skb, &sk->sk_receive_queue); in pppopns_recv_core()
141 skb_queue_tail(&sk->sk_receive_queue, skb); in pppopns_recv_core()
148 skb_queue_walk_safe(&sk->sk_receive_queue, skb, skb1) { in pppopns_recv_core()
150 if (atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf && in pppopns_recv_core()
154 skb_unlink(skb, &sk->sk_receive_queue); in pppopns_recv_core()
157 ppp_input(&pppox_sk(sk)->chan, skb); in pppopns_recv_core()
[all …]
Dpptp.c173 struct sock *sk = (struct sock *) chan->private; in pptp_xmit() local
174 struct pppox_sock *po = pppox_sk(sk); in pptp_xmit()
175 struct net *net = sock_net(sk); in pptp_xmit()
212 if (skb->sk) in pptp_xmit()
213 skb_set_owner_w(new_skb, skb->sk); in pptp_xmit()
269 if (ip_dont_fragment(sk, &rt->dst)) in pptp_xmit()
289 ip_local_out(net, skb->sk, skb); in pptp_xmit()
297 static int pptp_rcv_core(struct sock *sk, struct sk_buff *skb) in pptp_rcv_core() argument
299 struct pppox_sock *po = pppox_sk(sk); in pptp_rcv_core()
305 if (!(sk->sk_state & PPPOX_CONNECTED)) { in pptp_rcv_core()
[all …]
Dpppolac.c73 struct sock *sk = (struct sock *)sk_udp->sk_user_data; in pppolac_recv_core() local
74 struct pppolac_opt *opt = &pppox_sk(sk)->proto.lac; in pppolac_recv_core()
145 skb_set_owner_r(skb, sk); in pppolac_recv_core()
146 skb_queue_walk(&sk->sk_receive_queue, skb1) { in pppolac_recv_core()
153 skb_insert(skb1, skb, &sk->sk_receive_queue); in pppolac_recv_core()
160 skb_queue_tail(&sk->sk_receive_queue, skb); in pppolac_recv_core()
167 skb_queue_walk_safe(&sk->sk_receive_queue, skb, skb1) { in pppolac_recv_core()
169 if (atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf && in pppolac_recv_core()
173 skb_unlink(skb, &sk->sk_receive_queue); in pppolac_recv_core()
176 ppp_input(&pppox_sk(sk)->chan, skb); in pppolac_recv_core()
[all …]
Dpppox.c58 void pppox_unbind_sock(struct sock *sk) in pppox_unbind_sock() argument
62 if (sk->sk_state & (PPPOX_BOUND | PPPOX_CONNECTED | PPPOX_ZOMBIE)) { in pppox_unbind_sock()
63 ppp_unregister_channel(&pppox_sk(sk)->chan); in pppox_unbind_sock()
64 sk->sk_state = PPPOX_DEAD; in pppox_unbind_sock()
74 struct sock *sk = sock->sk; in pppox_ioctl() local
75 struct pppox_sock *po = pppox_sk(sk); in pppox_ioctl()
78 lock_sock(sk); in pppox_ioctl()
84 if (!(sk->sk_state & PPPOX_CONNECTED)) in pppox_ioctl()
93 sk->sk_state |= PPPOX_BOUND; in pppox_ioctl()
97 rc = pppox_protos[sk->sk_protocol]->ioctl ? in pppox_ioctl()
[all …]
/drivers/scsi/
Discsi_tcp.c114 static inline int iscsi_sw_sk_state_check(struct sock *sk) in iscsi_sw_sk_state_check() argument
116 struct iscsi_conn *conn = sk->sk_user_data; in iscsi_sw_sk_state_check()
118 if ((sk->sk_state == TCP_CLOSE_WAIT || sk->sk_state == TCP_CLOSE) && in iscsi_sw_sk_state_check()
120 !atomic_read(&sk->sk_rmem_alloc)) { in iscsi_sw_sk_state_check()
128 static void iscsi_sw_tcp_data_ready(struct sock *sk) in iscsi_sw_tcp_data_ready() argument
134 read_lock(&sk->sk_callback_lock); in iscsi_sw_tcp_data_ready()
135 conn = sk->sk_user_data; in iscsi_sw_tcp_data_ready()
137 read_unlock(&sk->sk_callback_lock); in iscsi_sw_tcp_data_ready()
150 tcp_read_sock(sk, &rd_desc, iscsi_sw_tcp_recv); in iscsi_sw_tcp_data_ready()
152 iscsi_sw_sk_state_check(sk); in iscsi_sw_tcp_data_ready()
[all …]
Du14-34f.c1553 static void sort(unsigned long sk[], unsigned int da[], unsigned int n, in sort() argument
1563 if (sk[j] > sk[k]) k = j; in sort()
1566 if (sk[j] < sk[k]) k = j; in sort()
1570 x = sk[k]; sk[k] = sk[i]; sk[i] = x; in sort()
Deata.c2067 static void sort(unsigned long sk[], unsigned int da[], unsigned int n, in sort() argument
2078 if (sk[j] > sk[k]) in sort()
2081 if (sk[j] < sk[k]) in sort()
2086 x = sk[k]; in sort()
2087 sk[k] = sk[i]; in sort()
2088 sk[i] = x; in sort()
/drivers/target/iscsi/
Discsi_target_nego.c406 static void iscsi_target_sk_data_ready(struct sock *sk) in iscsi_target_sk_data_ready() argument
408 struct iscsi_conn *conn = sk->sk_user_data; in iscsi_target_sk_data_ready()
413 write_lock_bh(&sk->sk_callback_lock); in iscsi_target_sk_data_ready()
414 if (!sk->sk_user_data) { in iscsi_target_sk_data_ready()
415 write_unlock_bh(&sk->sk_callback_lock); in iscsi_target_sk_data_ready()
419 write_unlock_bh(&sk->sk_callback_lock); in iscsi_target_sk_data_ready()
424 write_unlock_bh(&sk->sk_callback_lock); in iscsi_target_sk_data_ready()
429 write_unlock_bh(&sk->sk_callback_lock); in iscsi_target_sk_data_ready()
439 write_unlock_bh(&sk->sk_callback_lock); in iscsi_target_sk_data_ready()
446 struct sock *sk; in iscsi_target_set_sock_callbacks() local
[all …]
/drivers/staging/lustre/lnet/klnds/socklnd/
Dsocklnd_lib.c65 int caps = conn->ksnc_sock->sk->sk_route_caps; in ksocknal_lib_zc_capable()
132 struct sock *sk = sock->sk; in ksocknal_lib_send_kiov() local
145 if (sk->sk_prot->sendpage != NULL) { in ksocknal_lib_send_kiov()
146 rc = sk->sk_prot->sendpage(sk, page, in ksocknal_lib_send_kiov()
149 rc = tcp_sendpage(sk, page, offset, fragsize, msgflg); in ksocknal_lib_send_kiov()
464 sock->sk->sk_allocation = GFP_NOFS; in ksocknal_lib_setup_sock()
554 struct sock *sk; in ksocknal_lib_push_conn() local
564 sk = conn->ksnc_sock->sk; in ksocknal_lib_push_conn()
565 tp = tcp_sk(sk); in ksocknal_lib_push_conn()
567 lock_sock(sk); in ksocknal_lib_push_conn()
[all …]
/drivers/net/
Dmacvtap.c36 struct sock sk; member
196 sock_hold(&q->sk); in macvtap_set_queue()
258 sock_put(&q->sk); in macvtap_put_queue()
265 sock_put(&q->sk); in macvtap_put_queue()
330 sock_put(&q->sk); in macvtap_del_queues()
354 if (skb_queue_len(&q->sk.sk_receive_queue) >= dev->tx_queue_len) in macvtap_handle_frame()
372 skb_queue_tail(&q->sk.sk_receive_queue, skb); in macvtap_handle_frame()
381 skb_queue_tail(&q->sk.sk_receive_queue, segs); in macvtap_handle_frame()
394 skb_queue_tail(&q->sk.sk_receive_queue, skb); in macvtap_handle_frame()
398 wake_up_interruptible_poll(sk_sleep(&q->sk), POLLIN | POLLRDNORM | POLLRDBAND); in macvtap_handle_frame()
[all …]
Dtun.c154 struct sock sk; member
513 skb_queue_purge(&tfile->sk.sk_receive_queue); in tun_queue_purge()
514 skb_queue_purge(&tfile->sk.sk_error_queue); in tun_queue_purge()
536 sock_put(&tfile->sk); in __tun_detach()
547 sock_put(&tfile->sk); in __tun_detach()
558 sock_put(&tfile->sk); in __tun_detach()
578 tfile->socket.sk->sk_shutdown = RCV_SHUTDOWN; in tun_detach_all()
579 tfile->socket.sk->sk_data_ready(tfile->socket.sk); in tun_detach_all()
584 tfile->socket.sk->sk_shutdown = RCV_SHUTDOWN; in tun_detach_all()
585 tfile->socket.sk->sk_data_ready(tfile->socket.sk); in tun_detach_all()
[all …]
Dvxlan.c239 if (inet_sk(vs->sock->sk)->inet_sport == port && in vxlan_find_sock()
619 struct sock *sk = vs->sock->sk; in vxlan_notify_add_rx_port() local
620 struct net *net = sock_net(sk); in vxlan_notify_add_rx_port()
622 __be16 port = inet_sk(sk)->inet_sport; in vxlan_notify_add_rx_port()
644 struct sock *sk = vs->sock->sk; in vxlan_notify_del_rx_port() local
645 struct net *net = sock_net(sk); in vxlan_notify_del_rx_port()
647 __be16 port = inet_sk(sk)->inet_sport; in vxlan_notify_del_rx_port()
1050 vn = net_generic(sock_net(vs->sock->sk), vxlan_net_id); in __vxlan_sock_release()
1074 struct sock *sk; in vxlan_igmp_join() local
1085 sk = vxlan->vn4_sock->sock->sk; in vxlan_igmp_join()
[all …]
Dvrf.c214 ret = ip6_local_out(net, skb->sk, skb); in vrf_process_v6_outbound()
282 ret = ip_local_out(dev_net(skb_dst(skb)->dev), skb->sk, skb); in vrf_process_v4_outbound()
332 static int vrf_finish_output6(struct net *net, struct sock *sk, in vrf_finish_output6() argument
365 static int vrf_output6(struct net *net, struct sock *sk, struct sk_buff *skb) in vrf_output6() argument
368 net, sk, skb, NULL, skb_dst(skb)->dev, in vrf_output6()
411 static int vrf_finish_output(struct net *net, struct sock *sk, struct sk_buff *skb) in vrf_finish_output() argument
432 if (skb->sk) in vrf_finish_output()
433 skb_set_owner_w(skb2, skb->sk); in vrf_finish_output()
457 static int vrf_output(struct net *net, struct sock *sk, struct sk_buff *skb) in vrf_output() argument
467 net, sk, skb, NULL, dev, in vrf_output()
Dgeneve.c167 sa_family = gs->sock->sk->sk_family; in geneve_rx()
305 static int geneve_udp_encap_recv(struct sock *sk, struct sk_buff *skb) in geneve_udp_encap_recv() argument
328 gs = rcu_dereference_sk_user_data(sk); in geneve_udp_encap_recv()
370 struct sock *sk = gs->sock->sk; in geneve_notify_add_rx_port() local
371 sa_family_t sa_family = sk->sk_family; in geneve_notify_add_rx_port()
520 struct sock *sk = gs->sock->sk; in geneve_notify_del_rx_port() local
521 sa_family_t sa_family = sk->sk_family; in geneve_notify_del_rx_port()
553 if (inet_sk(gs->sock->sk)->inet_sport == dst_port && in geneve_find_sock()
554 inet_sk(gs->sock->sk)->sk.sk_family == family) { in geneve_find_sock()
790 dst = ipv6_stub->ipv6_dst_lookup_flow(geneve->net, gs6->sock->sk, fl6, in geneve_get_v6_dst()
[all …]
/drivers/isdn/i4l/
Disdn_audio.c450 int sk, in isdn_audio_goertzel() local
467 sk = sk1 = sk2 = 0; in isdn_audio_goertzel()
469 sk = sample[n] + ((cos2pik[k] * sk1) >> 15) - sk2; in isdn_audio_goertzel()
471 sk1 = sk; in isdn_audio_goertzel()
474 sk >>= 1; in isdn_audio_goertzel()
479 if (sk < -32768 || sk > 32767) in isdn_audio_goertzel()
481 "isdn_audio: dtmf goertzel overflow, sk=%d\n", sk); in isdn_audio_goertzel()
486 ((sk * sk) >> AMP_BITS) - in isdn_audio_goertzel()
487 ((((cos2pik[k] * sk) >> 15) * sk2) >> AMP_BITS) + in isdn_audio_goertzel()
/drivers/vhost/
Dnet.c237 sock_flag(sock->sk, SOCK_ZEROCOPY); in vhost_sock_zcopy()
489 static int peek_head_len(struct sock *sk) in peek_head_len() argument
495 spin_lock_irqsave(&sk->sk_receive_queue.lock, flags); in peek_head_len()
496 head = skb_peek(&sk->sk_receive_queue); in peek_head_len()
503 spin_unlock_irqrestore(&sk->sk_receive_queue.lock, flags); in peek_head_len()
507 static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) in vhost_net_rx_peek_head_len() argument
512 int len = peek_head_len(sk); in vhost_net_rx_peek_head_len()
523 skb_queue_empty(&sk->sk_receive_queue) && in vhost_net_rx_peek_head_len()
538 len = peek_head_len(sk); in vhost_net_rx_peek_head_len()
669 sock_len = vhost_net_rx_peek_head_len(net, sock->sk); in handle_rx()
[all …]
Dvsock.c564 static void vhost_vsock_reset_orphans(struct sock *sk) in vhost_vsock_reset_orphans() argument
566 struct vsock_sock *vsk = vsock_sk(sk); in vhost_vsock_reset_orphans()
583 sock_set_flag(sk, SOCK_DONE); in vhost_vsock_reset_orphans()
585 sk->sk_state = SS_UNCONNECTED; in vhost_vsock_reset_orphans()
586 sk->sk_err = ECONNRESET; in vhost_vsock_reset_orphans()
587 sk->sk_error_report(sk); in vhost_vsock_reset_orphans()
/drivers/block/drbd/
Ddrbd_receiver.c559 sock->sk->sk_sndbuf = snd; in drbd_setbufsize()
560 sock->sk->sk_userlocks |= SOCK_SNDBUF_LOCK; in drbd_setbufsize()
563 sock->sk->sk_rcvbuf = rcv; in drbd_setbufsize()
564 sock->sk->sk_userlocks |= SOCK_RCVBUF_LOCK; in drbd_setbufsize()
609 sock->sk->sk_rcvtimeo = in drbd_try_connect()
610 sock->sk->sk_sndtimeo = connect_int * HZ; in drbd_try_connect()
660 void (*original_sk_state_change)(struct sock *sk);
664 static void drbd_incoming_connection(struct sock *sk) in drbd_incoming_connection() argument
666 struct accept_wait_data *ad = sk->sk_user_data; in drbd_incoming_connection()
667 void (*state_change)(struct sock *sk); in drbd_incoming_connection()
[all …]
Ddrbd_worker.c604 struct sock *sk = connection->data.socket->sk; in make_resync_request() local
605 int queued = sk->sk_wmem_queued; in make_resync_request()
606 int sndbuf = sk->sk_sndbuf; in make_resync_request()
609 if (sk->sk_socket) in make_resync_request()
610 set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); in make_resync_request()
/drivers/staging/lustre/lnet/lnet/
Dlib-socket.c484 *txbufsize = sock->sk->sk_sndbuf; in lnet_sock_getbuf()
487 *rxbufsize = sock->sk->sk_rcvbuf; in lnet_sock_getbuf()
541 add_wait_queue(sk_sleep(sock->sk), &wait); in lnet_sock_accept()
543 remove_wait_queue(sk_sleep(sock->sk), &wait); in lnet_sock_accept()
/drivers/infiniband/hw/usnic/
Dusnic_transport.c191 *proto = sock->sk->sk_protocol; in usnic_transport_sock_get_addr()

12