Lines Matching refs:clcsk
248 struct sock *clcsk = smc->clcsock->sk; in smc_fback_restore_callbacks() local
250 write_lock_bh(&clcsk->sk_callback_lock); in smc_fback_restore_callbacks()
251 clcsk->sk_user_data = NULL; in smc_fback_restore_callbacks()
253 smc_clcsock_restore_cb(&clcsk->sk_state_change, &smc->clcsk_state_change); in smc_fback_restore_callbacks()
254 smc_clcsock_restore_cb(&clcsk->sk_data_ready, &smc->clcsk_data_ready); in smc_fback_restore_callbacks()
255 smc_clcsock_restore_cb(&clcsk->sk_write_space, &smc->clcsk_write_space); in smc_fback_restore_callbacks()
256 smc_clcsock_restore_cb(&clcsk->sk_error_report, &smc->clcsk_error_report); in smc_fback_restore_callbacks()
258 write_unlock_bh(&clcsk->sk_callback_lock); in smc_fback_restore_callbacks()
773 static void smc_fback_forward_wakeup(struct smc_sock *smc, struct sock *clcsk, in smc_fback_forward_wakeup() argument
782 wq = rcu_dereference(clcsk->sk_wq); in smc_fback_forward_wakeup()
785 add_wait_queue(sk_sleep(clcsk), &mark.wait_entry); in smc_fback_forward_wakeup()
786 clcsock_callback(clcsk); in smc_fback_forward_wakeup()
787 remove_wait_queue(sk_sleep(clcsk), &mark.wait_entry); in smc_fback_forward_wakeup()
795 static void smc_fback_state_change(struct sock *clcsk) in smc_fback_state_change() argument
799 read_lock_bh(&clcsk->sk_callback_lock); in smc_fback_state_change()
800 smc = smc_clcsock_user_data(clcsk); in smc_fback_state_change()
802 smc_fback_forward_wakeup(smc, clcsk, in smc_fback_state_change()
804 read_unlock_bh(&clcsk->sk_callback_lock); in smc_fback_state_change()
807 static void smc_fback_data_ready(struct sock *clcsk) in smc_fback_data_ready() argument
811 read_lock_bh(&clcsk->sk_callback_lock); in smc_fback_data_ready()
812 smc = smc_clcsock_user_data(clcsk); in smc_fback_data_ready()
814 smc_fback_forward_wakeup(smc, clcsk, in smc_fback_data_ready()
816 read_unlock_bh(&clcsk->sk_callback_lock); in smc_fback_data_ready()
819 static void smc_fback_write_space(struct sock *clcsk) in smc_fback_write_space() argument
823 read_lock_bh(&clcsk->sk_callback_lock); in smc_fback_write_space()
824 smc = smc_clcsock_user_data(clcsk); in smc_fback_write_space()
826 smc_fback_forward_wakeup(smc, clcsk, in smc_fback_write_space()
828 read_unlock_bh(&clcsk->sk_callback_lock); in smc_fback_write_space()
831 static void smc_fback_error_report(struct sock *clcsk) in smc_fback_error_report() argument
835 read_lock_bh(&clcsk->sk_callback_lock); in smc_fback_error_report()
836 smc = smc_clcsock_user_data(clcsk); in smc_fback_error_report()
838 smc_fback_forward_wakeup(smc, clcsk, in smc_fback_error_report()
840 read_unlock_bh(&clcsk->sk_callback_lock); in smc_fback_error_report()
845 struct sock *clcsk = smc->clcsock->sk; in smc_fback_replace_callbacks() local
847 write_lock_bh(&clcsk->sk_callback_lock); in smc_fback_replace_callbacks()
848 clcsk->sk_user_data = (void *)((uintptr_t)smc | SK_USER_DATA_NOCOPY); in smc_fback_replace_callbacks()
850 smc_clcsock_replace_cb(&clcsk->sk_state_change, smc_fback_state_change, in smc_fback_replace_callbacks()
852 smc_clcsock_replace_cb(&clcsk->sk_data_ready, smc_fback_data_ready, in smc_fback_replace_callbacks()
854 smc_clcsock_replace_cb(&clcsk->sk_write_space, smc_fback_write_space, in smc_fback_replace_callbacks()
856 smc_clcsock_replace_cb(&clcsk->sk_error_report, smc_fback_error_report, in smc_fback_replace_callbacks()
859 write_unlock_bh(&clcsk->sk_callback_lock); in smc_fback_replace_callbacks()
2609 struct sock *clcsk = smc_sk(nsk)->clcsock->sk; in smc_accept() local
2611 lock_sock(clcsk); in smc_accept()
2612 if (skb_queue_empty(&clcsk->sk_receive_queue)) in smc_accept()
2613 sk_wait_data(clcsk, &timeo, NULL); in smc_accept()
2614 release_sock(clcsk); in smc_accept()