• Home
  • Raw
  • Download

Lines Matching refs:sk

402 static void lowcomms_data_ready(struct sock *sk)  in lowcomms_data_ready()  argument
406 read_lock_bh(&sk->sk_callback_lock); in lowcomms_data_ready()
407 con = sock2con(sk); in lowcomms_data_ready()
410 read_unlock_bh(&sk->sk_callback_lock); in lowcomms_data_ready()
413 static void lowcomms_write_space(struct sock *sk) in lowcomms_write_space() argument
417 read_lock_bh(&sk->sk_callback_lock); in lowcomms_write_space()
418 con = sock2con(sk); in lowcomms_write_space()
425 con->sock->sk->sk_write_pending--; in lowcomms_write_space()
431 read_unlock_bh(&sk->sk_callback_lock); in lowcomms_write_space()
442 static void lowcomms_state_change(struct sock *sk) in lowcomms_state_change() argument
449 if (sk->sk_shutdown) { in lowcomms_state_change()
450 if (sk->sk_shutdown == RCV_SHUTDOWN) in lowcomms_state_change()
451 lowcomms_data_ready(sk); in lowcomms_state_change()
452 } else if (sk->sk_state == TCP_ESTABLISHED) { in lowcomms_state_change()
453 lowcomms_write_space(sk); in lowcomms_state_change()
471 static void lowcomms_error_report(struct sock *sk) in lowcomms_error_report() argument
477 read_lock_bh(&sk->sk_callback_lock); in lowcomms_error_report()
478 con = sock2con(sk); in lowcomms_error_report()
484 inet = inet_sk(sk); in lowcomms_error_report()
485 switch (sk->sk_family) { in lowcomms_error_report()
491 ntohs(inet->inet_dport), sk->sk_err, in lowcomms_error_report()
492 sk->sk_err_soft); in lowcomms_error_report()
499 con->nodeid, &sk->sk_v6_daddr, in lowcomms_error_report()
500 ntohs(inet->inet_dport), sk->sk_err, in lowcomms_error_report()
501 sk->sk_err_soft); in lowcomms_error_report()
508 sk->sk_family, sk->sk_err, sk->sk_err_soft); in lowcomms_error_report()
512 read_unlock_bh(&sk->sk_callback_lock); in lowcomms_error_report()
514 orig_report(sk); in lowcomms_error_report()
520 struct sock *sk = sock->sk; in save_listen_callbacks() local
522 listen_sock.sk_data_ready = sk->sk_data_ready; in save_listen_callbacks()
523 listen_sock.sk_state_change = sk->sk_state_change; in save_listen_callbacks()
524 listen_sock.sk_write_space = sk->sk_write_space; in save_listen_callbacks()
525 listen_sock.sk_error_report = sk->sk_error_report; in save_listen_callbacks()
530 struct sock *sk = sock->sk; in restore_callbacks() local
532 write_lock_bh(&sk->sk_callback_lock); in restore_callbacks()
533 sk->sk_user_data = NULL; in restore_callbacks()
534 sk->sk_data_ready = listen_sock.sk_data_ready; in restore_callbacks()
535 sk->sk_state_change = listen_sock.sk_state_change; in restore_callbacks()
536 sk->sk_write_space = listen_sock.sk_write_space; in restore_callbacks()
537 sk->sk_error_report = listen_sock.sk_error_report; in restore_callbacks()
538 write_unlock_bh(&sk->sk_callback_lock); in restore_callbacks()
544 struct sock *sk = sock->sk; in add_sock() local
546 write_lock_bh(&sk->sk_callback_lock); in add_sock()
549 sk->sk_user_data = con; in add_sock()
551 sk->sk_data_ready = lowcomms_data_ready; in add_sock()
552 sk->sk_write_space = lowcomms_write_space; in add_sock()
553 sk->sk_state_change = lowcomms_state_change; in add_sock()
554 sk->sk_allocation = GFP_NOFS; in add_sock()
555 sk->sk_error_report = lowcomms_error_report; in add_sock()
556 write_unlock_bh(&sk->sk_callback_lock); in add_sock()
813 sock_set_mark(newsock->sk, mark); in accept_from_sock()
942 result = sock_bind_add(con->sock->sk, addr, addr_len); in sctp_bind_addrs()
997 sock_set_mark(sock->sk, mark); in sctp_connect_to_sock()
1012 sctp_sock_set_nodelay(sock->sk); in sctp_connect_to_sock()
1019 sock_set_sndtimeo(sock->sk, 5); in sctp_connect_to_sock()
1022 sock_set_sndtimeo(sock->sk, 0); in sctp_connect_to_sock()
1085 sock_set_mark(sock->sk, mark); in tcp_connect_to_sock()
1115 tcp_sock_set_nodelay(sock->sk); in tcp_connect_to_sock()
1172 sock_set_mark(sock->sk, dlm_config.ci_mark); in tcp_create_listen_sock()
1175 tcp_sock_set_nodelay(sock->sk); in tcp_create_listen_sock()
1177 sock_set_reuseaddr(sock->sk); in tcp_create_listen_sock()
1179 write_lock_bh(&sock->sk->sk_callback_lock); in tcp_create_listen_sock()
1180 sock->sk->sk_user_data = con; in tcp_create_listen_sock()
1184 write_unlock_bh(&sock->sk->sk_callback_lock); in tcp_create_listen_sock()
1196 sock_set_keepalive(sock->sk); in tcp_create_listen_sock()
1255 sock_set_rcvbuf(sock->sk, NEEDED_RMEM); in sctp_listen_for_all()
1256 sock_set_mark(sock->sk, dlm_config.ci_mark); in sctp_listen_for_all()
1257 sctp_sock_set_nodelay(sock->sk); in sctp_listen_for_all()
1259 write_lock_bh(&sock->sk->sk_callback_lock); in sctp_listen_for_all()
1261 sock->sk->sk_user_data = con; in sctp_listen_for_all()
1264 con->sock->sk->sk_data_ready = lowcomms_data_ready; in sctp_listen_for_all()
1268 write_unlock_bh(&sock->sk->sk_callback_lock); in sctp_listen_for_all()
1444 con->sock->sk->sk_write_pending++; in send_to_sock()
1578 if (con->sock && con->sock->sk) { in _stop_conn()
1579 write_lock_bh(&con->sock->sk->sk_callback_lock); in _stop_conn()
1580 con->sock->sk->sk_user_data = NULL; in _stop_conn()
1581 write_unlock_bh(&con->sock->sk->sk_callback_lock); in _stop_conn()