Lines Matching refs:link_idx

789 		   u8 link_idx, struct smc_init_info *ini)  in smcr_link_init()  argument
815 lnk->link_idx = link_idx; in smcr_link_init()
882 u8 link_idx; in smc_lgr_create() local
969 link_idx = SMC_SINGLE_LINK; in smc_lgr_create()
970 lnk = &lgr->lnk[link_idx]; in smc_lgr_create()
971 rc = smcr_link_init(lgr, lnk, link_idx, ini); in smc_lgr_create()
1096 if (!smc_link_active(&lgr->lnk[i]) || i == from_lnk->link_idx) in smc_switch_conns()
1285 buf_desc->is_reg_mr[lnk->link_idx] = false; in smcr_buf_unmap_link()
1286 if (!buf_desc->is_map_ib[lnk->link_idx]) in smcr_buf_unmap_link()
1290 buf_desc->mr[lnk->link_idx]) { in smcr_buf_unmap_link()
1291 smc_ib_put_memory_region(buf_desc->mr[lnk->link_idx]); in smcr_buf_unmap_link()
1292 buf_desc->mr[lnk->link_idx] = NULL; in smcr_buf_unmap_link()
1299 sg_free_table(&buf_desc->sgt[lnk->link_idx]); in smcr_buf_unmap_link()
1300 buf_desc->is_map_ib[lnk->link_idx] = false; in smcr_buf_unmap_link()
1330 lgr->rtokens[i][lnk->link_idx].rkey = 0; in smcr_rtoken_clear_link()
1331 lgr->rtokens[i][lnk->link_idx].dma_addr = 0; in smcr_rtoken_clear_link()
2137 if (buf_desc->is_map_ib[lnk->link_idx]) in smcr_buf_map_link()
2149 rc = sg_alloc_table(&buf_desc->sgt[lnk->link_idx], nents, GFP_KERNEL); in smcr_buf_map_link()
2155 for_each_sg(buf_desc->sgt[lnk->link_idx].sgl, sg, nents, i) { in smcr_buf_map_link()
2164 sg_set_buf(buf_desc->sgt[lnk->link_idx].sgl, in smcr_buf_map_link()
2178 smc_ib_is_sg_need_sync(lnk, buf_desc) << lnk->link_idx; in smcr_buf_map_link()
2187 buf_desc, lnk->link_idx); in smcr_buf_map_link()
2193 buf_desc->is_map_ib[lnk->link_idx] = true; in smcr_buf_map_link()
2200 sg_free_table(&buf_desc->sgt[lnk->link_idx]); in smcr_buf_map_link()
2211 if (!buf_desc->is_reg_mr[link->link_idx]) { in smcr_link_reg_buf()
2214 buf_desc->mr[link->link_idx]->iova = in smcr_link_reg_buf()
2216 if (smc_wr_reg_send(link, buf_desc->mr[link->link_idx])) { in smcr_link_reg_buf()
2220 buf_desc->is_reg_mr[link->link_idx] = true; in smcr_link_reg_buf()
2623 void smc_rtoken_set(struct smc_link_group *lgr, int link_idx, int link_idx_new, in smc_rtoken_set() argument
2628 rtok_idx = smc_rtoken_find_by_link(lgr, link_idx, ntohl(nw_rkey_known)); in smc_rtoken_set()
2642 int link_idx; in smc_rtoken_set2() local
2644 for (link_idx = 0; link_idx < SMC_LINKS_PER_LGR_MAX; link_idx++) { in smc_rtoken_set2()
2645 if (lgr->lnk[link_idx].link_id == link_id) { in smc_rtoken_set2()
2652 lgr->rtokens[rtok_idx][link_idx].rkey = rkey; in smc_rtoken_set2()
2653 lgr->rtokens[rtok_idx][link_idx].dma_addr = dma_addr; in smc_rtoken_set2()
2665 if (lgr->rtokens[i][lnk->link_idx].rkey == rkey && in smc_rtoken_add()
2666 lgr->rtokens[i][lnk->link_idx].dma_addr == dma_addr && in smc_rtoken_add()
2675 lgr->rtokens[i][lnk->link_idx].rkey = rkey; in smc_rtoken_add()
2676 lgr->rtokens[i][lnk->link_idx].dma_addr = dma_addr; in smc_rtoken_add()
2688 if (lgr->rtokens[i][lnk->link_idx].rkey == rkey && in smc_rtoken_delete()