• Home
  • Raw
  • Download

Lines Matching refs:new_smc

1134 static int smc_clcsock_accept(struct smc_sock *lsmc, struct smc_sock **new_smc)  in smc_clcsock_accept()  argument
1146 *new_smc = NULL; in smc_clcsock_accept()
1150 *new_smc = smc_sk(new_sk); in smc_clcsock_accept()
1166 *new_smc = NULL; in smc_clcsock_accept()
1174 (*new_smc)->clcsock = new_clcsock; in smc_clcsock_accept()
1297 static void smc_listen_out(struct smc_sock *new_smc) in smc_listen_out() argument
1299 struct smc_sock *lsmc = new_smc->listen_smc; in smc_listen_out()
1300 struct sock *newsmcsk = &new_smc->sk; in smc_listen_out()
1316 static void smc_listen_out_connected(struct smc_sock *new_smc) in smc_listen_out_connected() argument
1318 struct sock *newsmcsk = &new_smc->sk; in smc_listen_out_connected()
1324 smc_listen_out(new_smc); in smc_listen_out_connected()
1328 static void smc_listen_out_err(struct smc_sock *new_smc) in smc_listen_out_err() argument
1330 struct sock *newsmcsk = &new_smc->sk; in smc_listen_out_err()
1333 sock_put(&new_smc->sk); /* passive closing */ in smc_listen_out_err()
1336 smc_listen_out(new_smc); in smc_listen_out_err()
1340 static void smc_listen_decline(struct smc_sock *new_smc, int reason_code, in smc_listen_decline() argument
1345 smc_lgr_cleanup_early(&new_smc->conn); in smc_listen_decline()
1347 smc_conn_free(&new_smc->conn); in smc_listen_decline()
1349 smc_listen_out_err(new_smc); in smc_listen_decline()
1352 smc_switch_to_fallback(new_smc); in smc_listen_decline()
1353 new_smc->fallback_rsn = reason_code; in smc_listen_decline()
1355 if (smc_clc_send_decline(new_smc, reason_code, version) < 0) { in smc_listen_decline()
1356 smc_listen_out_err(new_smc); in smc_listen_decline()
1360 smc_listen_out_connected(new_smc); in smc_listen_decline()
1364 static int smc_listen_v2_check(struct smc_sock *new_smc, in smc_listen_v2_check() argument
1405 static int smc_listen_prfx_check(struct smc_sock *new_smc, in smc_listen_prfx_check() argument
1409 struct socket *newclcsock = new_smc->clcsock; in smc_listen_prfx_check()
1421 static int smc_listen_rdma_init(struct smc_sock *new_smc, in smc_listen_rdma_init() argument
1427 rc = smc_conn_create(new_smc, ini); in smc_listen_rdma_init()
1432 if (smc_buf_create(new_smc, false)) in smc_listen_rdma_init()
1439 static int smc_listen_ism_init(struct smc_sock *new_smc, in smc_listen_ism_init() argument
1444 rc = smc_conn_create(new_smc, ini); in smc_listen_ism_init()
1449 rc = smc_buf_create(new_smc, true); in smc_listen_ism_init()
1452 smc_lgr_cleanup_early(&new_smc->conn); in smc_listen_ism_init()
1454 smc_conn_free(&new_smc->conn); in smc_listen_ism_init()
1497 static void smc_find_ism_v2_device_serv(struct smc_sock *new_smc, in smc_find_ism_v2_device_serv() argument
1549 if (smc_listen_ism_init(new_smc, ini)) in smc_find_ism_v2_device_serv()
1563 static void smc_find_ism_v1_device_serv(struct smc_sock *new_smc, in smc_find_ism_v1_device_serv() argument
1574 if (smc_find_ism_device(new_smc, ini)) in smc_find_ism_v1_device_serv()
1577 if (!smc_listen_ism_init(new_smc, ini)) in smc_find_ism_v1_device_serv()
1586 static int smc_listen_rdma_reg(struct smc_sock *new_smc, bool local_first) in smc_listen_rdma_reg() argument
1588 struct smc_connection *conn = &new_smc->conn; in smc_listen_rdma_reg()
1594 smc_rmb_sync_sg_for_device(&new_smc->conn); in smc_listen_rdma_reg()
1599 static int smc_find_rdma_v1_device_serv(struct smc_sock *new_smc, in smc_find_rdma_v1_device_serv() argument
1610 rc = smc_find_rdma_device(new_smc, ini); in smc_find_rdma_v1_device_serv()
1618 rc = smc_listen_rdma_init(new_smc, ini); in smc_find_rdma_v1_device_serv()
1621 return smc_listen_rdma_reg(new_smc, ini->first_contact_local); in smc_find_rdma_v1_device_serv()
1625 static int smc_listen_find_device(struct smc_sock *new_smc, in smc_listen_find_device() argument
1632 smc_find_ism_v2_device_serv(new_smc, pclc, ini); in smc_listen_find_device()
1640 rc = smc_listen_prfx_check(new_smc, pclc); in smc_listen_find_device()
1645 if (smc_vlan_by_tcpsk(new_smc->clcsock, ini)) in smc_listen_find_device()
1649 smc_find_ism_v1_device_serv(new_smc, pclc, ini); in smc_listen_find_device()
1657 return smc_find_rdma_v1_device_serv(new_smc, pclc, ini); in smc_listen_find_device()
1661 static int smc_listen_rdma_finish(struct smc_sock *new_smc, in smc_listen_rdma_finish() argument
1665 struct smc_link *link = new_smc->conn.lnk; in smc_listen_rdma_finish()
1671 if (smc_rmb_rtoken_handling(&new_smc->conn, link, cclc)) in smc_listen_rdma_finish()
1679 reason_code = smcr_serv_conf_first_link(new_smc); in smc_listen_rdma_finish()
1688 struct smc_sock *new_smc = container_of(work, struct smc_sock, in smc_listen_work() local
1691 struct socket *newclcsock = new_smc->clcsock; in smc_listen_work()
1698 if (new_smc->listen_smc->sk.sk_state != SMC_LISTEN) in smc_listen_work()
1699 return smc_listen_out_err(new_smc); in smc_listen_work()
1701 if (new_smc->use_fallback) { in smc_listen_work()
1702 smc_listen_out_connected(new_smc); in smc_listen_work()
1708 smc_switch_to_fallback(new_smc); in smc_listen_work()
1709 new_smc->fallback_rsn = SMC_CLC_DECL_PEERNOSMC; in smc_listen_work()
1710 smc_listen_out_connected(new_smc); in smc_listen_work()
1723 rc = smc_clc_wait_msg(new_smc, pclc, sizeof(*buf), in smc_listen_work()
1730 if (using_ipsec(new_smc)) { in smc_listen_work()
1742 rc = smc_listen_v2_check(new_smc, pclc, ini); in smc_listen_work()
1747 smc_close_init(new_smc); in smc_listen_work()
1748 smc_rx_init(new_smc); in smc_listen_work()
1749 smc_tx_init(new_smc); in smc_listen_work()
1752 rc = smc_listen_find_device(new_smc, pclc, ini); in smc_listen_work()
1757 rc = smc_clc_send_accept(new_smc, ini->first_contact_local, in smc_listen_work()
1769 rc = smc_clc_wait_msg(new_smc, cclc, sizeof(*buf), in smc_listen_work()
1779 rc = smc_listen_rdma_finish(new_smc, cclc, in smc_listen_work()
1785 smc_conn_save_peer_info(new_smc, cclc); in smc_listen_work()
1786 smc_listen_out_connected(new_smc); in smc_listen_work()
1792 smc_listen_decline(new_smc, rc, ini ? ini->first_contact_local : 0, in smc_listen_work()
1804 struct smc_sock *new_smc; in smc_tcp_listen_work() local
1809 rc = smc_clcsock_accept(lsmc, &new_smc); in smc_tcp_listen_work()
1812 if (!new_smc) in smc_tcp_listen_work()
1815 new_smc->listen_smc = lsmc; in smc_tcp_listen_work()
1816 new_smc->use_fallback = lsmc->use_fallback; in smc_tcp_listen_work()
1817 new_smc->fallback_rsn = lsmc->fallback_rsn; in smc_tcp_listen_work()
1819 INIT_WORK(&new_smc->smc_listen_work, smc_listen_work); in smc_tcp_listen_work()
1820 smc_copy_sock_settings_to_smc(new_smc); in smc_tcp_listen_work()
1821 new_smc->sk.sk_sndbuf = lsmc->sk.sk_sndbuf; in smc_tcp_listen_work()
1822 new_smc->sk.sk_rcvbuf = lsmc->sk.sk_rcvbuf; in smc_tcp_listen_work()
1823 sock_hold(&new_smc->sk); /* sock_put in passive closing */ in smc_tcp_listen_work()
1824 if (!queue_work(smc_hs_wq, &new_smc->smc_listen_work)) in smc_tcp_listen_work()
1825 sock_put(&new_smc->sk); in smc_tcp_listen_work()