Lines Matching refs:link
344 static int smc_reg_rmb(struct smc_link *link, struct smc_buf_desc *rmb_desc, in smc_reg_rmb() argument
349 if (smc_wr_reg_send(link, rmb_desc->mr_rx[SMC_SINGLE_LINK])) { in smc_reg_rmb()
358 if (smc_llc_do_confirm_rkey(link, rmb_desc)) { in smc_reg_rmb()
369 struct smc_link *link; in smc_clnt_conf_first_link() local
373 link = &lgr->lnk[SMC_SINGLE_LINK]; in smc_clnt_conf_first_link()
376 &link->llc_confirm, in smc_clnt_conf_first_link()
386 if (link->llc_confirm_rc) in smc_clnt_conf_first_link()
389 rc = smc_ib_modify_qp_rts(link); in smc_clnt_conf_first_link()
393 smc_wr_remember_qp_attr(link); in smc_clnt_conf_first_link()
395 if (smc_reg_rmb(link, smc->conn.rmb_desc, false)) in smc_clnt_conf_first_link()
399 rc = smc_llc_send_confirm_link(link, SMC_LLC_RESP); in smc_clnt_conf_first_link()
404 rest = wait_for_completion_interruptible_timeout(&link->llc_add, in smc_clnt_conf_first_link()
415 rc = smc_llc_send_add_link(link, in smc_clnt_conf_first_link()
416 link->smcibdev->mac[link->ibport - 1], in smc_clnt_conf_first_link()
417 link->gid, SMC_LLC_RESP); in smc_clnt_conf_first_link()
421 smc_llc_link_active(link, net->ipv4.sysctl_tcp_keepalive_time); in smc_clnt_conf_first_link()
460 static void smc_link_save_peer_info(struct smc_link *link, in smc_link_save_peer_info() argument
463 link->peer_qpn = ntoh24(clc->qpn); in smc_link_save_peer_info()
464 memcpy(link->peer_gid, clc->lcl.gid, SMC_GID_SIZE); in smc_link_save_peer_info()
465 memcpy(link->peer_mac, clc->lcl.mac, sizeof(link->peer_mac)); in smc_link_save_peer_info()
466 link->peer_psn = ntoh24(clc->psn); in smc_link_save_peer_info()
467 link->peer_mtu = clc->qp_mtu; in smc_link_save_peer_info()
613 struct smc_link *link; in smc_connect_rdma() local
627 link = &smc->conn.lgr->lnk[SMC_SINGLE_LINK]; in smc_connect_rdma()
637 smc_link_save_peer_info(link, aclc); in smc_connect_rdma()
647 if (smc_ib_ready_link(link)) in smc_connect_rdma()
651 if (smc_reg_rmb(link, smc->conn.rmb_desc, true)) in smc_connect_rdma()
1020 struct smc_link *link; in smc_serv_conf_first_link() local
1024 link = &lgr->lnk[SMC_SINGLE_LINK]; in smc_serv_conf_first_link()
1026 if (smc_reg_rmb(link, smc->conn.rmb_desc, false)) in smc_serv_conf_first_link()
1030 rc = smc_llc_send_confirm_link(link, SMC_LLC_REQ); in smc_serv_conf_first_link()
1036 &link->llc_confirm_resp, in smc_serv_conf_first_link()
1046 if (link->llc_confirm_resp_rc) in smc_serv_conf_first_link()
1050 rc = smc_llc_send_add_link(link, in smc_serv_conf_first_link()
1051 link->smcibdev->mac[link->ibport - 1], in smc_serv_conf_first_link()
1052 link->gid, SMC_LLC_REQ); in smc_serv_conf_first_link()
1057 rest = wait_for_completion_interruptible_timeout(&link->llc_add_resp, in smc_serv_conf_first_link()
1067 smc_llc_link_active(link, net->ipv4.sysctl_tcp_keepalive_time); in smc_serv_conf_first_link()
1208 struct smc_link *link = &new_smc->conn.lgr->lnk[SMC_SINGLE_LINK]; in smc_listen_rdma_reg() local
1211 if (smc_reg_rmb(link, new_smc->conn.rmb_desc, true)) in smc_listen_rdma_reg()
1224 struct smc_link *link = &new_smc->conn.lgr->lnk[SMC_SINGLE_LINK]; in smc_listen_rdma_finish() local
1228 smc_link_save_peer_info(link, cclc); in smc_listen_rdma_finish()
1236 if (smc_ib_ready_link(link)) { in smc_listen_rdma_finish()