Lines Matching refs:lsmc
1651 static int smc_clcsock_accept(struct smc_sock *lsmc, struct smc_sock **new_smc) in smc_clcsock_accept() argument
1654 struct sock *lsk = &lsmc->sk; in smc_clcsock_accept()
1669 mutex_lock(&lsmc->clcsock_release_lock); in smc_clcsock_accept()
1670 if (lsmc->clcsock) in smc_clcsock_accept()
1671 rc = kernel_accept(lsmc->clcsock, &new_clcsock, SOCK_NONBLOCK); in smc_clcsock_accept()
1672 mutex_unlock(&lsmc->clcsock_release_lock); in smc_clcsock_accept()
1690 new_clcsock->sk->sk_data_ready = lsmc->clcsk_data_ready; in smc_clcsock_accept()
1695 if (lsmc->use_fallback) { in smc_clcsock_accept()
1696 if (lsmc->clcsk_state_change) in smc_clcsock_accept()
1697 new_clcsock->sk->sk_state_change = lsmc->clcsk_state_change; in smc_clcsock_accept()
1698 if (lsmc->clcsk_write_space) in smc_clcsock_accept()
1699 new_clcsock->sk->sk_write_space = lsmc->clcsk_write_space; in smc_clcsock_accept()
1700 if (lsmc->clcsk_error_report) in smc_clcsock_accept()
1701 new_clcsock->sk->sk_error_report = lsmc->clcsk_error_report; in smc_clcsock_accept()
1837 struct smc_sock *lsmc = new_smc->listen_smc; in smc_listen_out() local
1841 atomic_dec(&lsmc->queued_smc_hs); in smc_listen_out()
1843 if (lsmc->sk.sk_state == SMC_LISTEN) { in smc_listen_out()
1844 lock_sock_nested(&lsmc->sk, SINGLE_DEPTH_NESTING); in smc_listen_out()
1845 smc_accept_enqueue(&lsmc->sk, newsmcsk); in smc_listen_out()
1846 release_sock(&lsmc->sk); in smc_listen_out()
1852 lsmc->sk.sk_data_ready(&lsmc->sk); in smc_listen_out()
1853 sock_put(&lsmc->sk); /* sock_hold in smc_tcp_listen_work */ in smc_listen_out()
2439 struct smc_sock *lsmc = container_of(work, struct smc_sock, in smc_tcp_listen_work() local
2441 struct sock *lsk = &lsmc->sk; in smc_tcp_listen_work()
2447 rc = smc_clcsock_accept(lsmc, &new_smc); in smc_tcp_listen_work()
2454 atomic_inc(&lsmc->queued_smc_hs); in smc_tcp_listen_work()
2456 new_smc->listen_smc = lsmc; in smc_tcp_listen_work()
2457 new_smc->use_fallback = lsmc->use_fallback; in smc_tcp_listen_work()
2458 new_smc->fallback_rsn = lsmc->fallback_rsn; in smc_tcp_listen_work()
2462 new_smc->sk.sk_sndbuf = lsmc->sk.sk_sndbuf; in smc_tcp_listen_work()
2463 new_smc->sk.sk_rcvbuf = lsmc->sk.sk_rcvbuf; in smc_tcp_listen_work()
2471 sock_put(&lsmc->sk); /* sock_hold in smc_clcsock_data_ready() */ in smc_tcp_listen_work()
2476 struct smc_sock *lsmc; in smc_clcsock_data_ready() local
2479 lsmc = smc_clcsock_user_data(listen_clcsock); in smc_clcsock_data_ready()
2480 if (!lsmc) in smc_clcsock_data_ready()
2482 lsmc->clcsk_data_ready(listen_clcsock); in smc_clcsock_data_ready()
2483 if (lsmc->sk.sk_state == SMC_LISTEN) { in smc_clcsock_data_ready()
2484 sock_hold(&lsmc->sk); /* sock_put in smc_tcp_listen_work() */ in smc_clcsock_data_ready()
2485 if (!queue_work(smc_tcp_ls_wq, &lsmc->tcp_listen_work)) in smc_clcsock_data_ready()
2486 sock_put(&lsmc->sk); in smc_clcsock_data_ready()
2562 struct smc_sock *lsmc; in smc_accept() local
2566 lsmc = smc_sk(sk); in smc_accept()
2570 if (lsmc->sk.sk_state != SMC_LISTEN) { in smc_accept()
2604 if (lsmc->sockopt_defer_accept && !(flags & O_NONBLOCK)) { in smc_accept()
2606 timeo = msecs_to_jiffies(lsmc->sockopt_defer_accept * in smc_accept()