Lines Matching refs:link_idx
738 u8 link_idx, struct smc_init_info *ini) in smcr_link_init() argument
759 lnk->link_idx = link_idx; in smcr_link_init()
825 u8 link_idx; in smc_lgr_create() local
904 link_idx = SMC_SINGLE_LINK; in smc_lgr_create()
905 lnk = &lgr->lnk[link_idx]; in smc_lgr_create()
906 rc = smcr_link_init(lgr, lnk, link_idx, ini); in smc_lgr_create()
1031 if (!smc_link_active(&lgr->lnk[i]) || i == from_lnk->link_idx) in smc_switch_conns()
1197 buf_desc->is_reg_mr[lnk->link_idx] = false; in smcr_buf_unmap_link()
1198 if (!buf_desc->is_map_ib[lnk->link_idx]) in smcr_buf_unmap_link()
1202 buf_desc->mr[lnk->link_idx]) { in smcr_buf_unmap_link()
1203 smc_ib_put_memory_region(buf_desc->mr[lnk->link_idx]); in smcr_buf_unmap_link()
1204 buf_desc->mr[lnk->link_idx] = NULL; in smcr_buf_unmap_link()
1211 sg_free_table(&buf_desc->sgt[lnk->link_idx]); in smcr_buf_unmap_link()
1212 buf_desc->is_map_ib[lnk->link_idx] = false; in smcr_buf_unmap_link()
1241 lgr->rtokens[i][lnk->link_idx].rkey = 0; in smcr_rtoken_clear_link()
1242 lgr->rtokens[i][lnk->link_idx].dma_addr = 0; in smcr_rtoken_clear_link()
2022 if (buf_desc->is_map_ib[lnk->link_idx]) in smcr_buf_map_link()
2034 rc = sg_alloc_table(&buf_desc->sgt[lnk->link_idx], nents, GFP_KERNEL); in smcr_buf_map_link()
2040 for_each_sg(buf_desc->sgt[lnk->link_idx].sgl, sg, nents, i) { in smcr_buf_map_link()
2049 sg_set_buf(buf_desc->sgt[lnk->link_idx].sgl, in smcr_buf_map_link()
2063 smc_ib_is_sg_need_sync(lnk, buf_desc) << lnk->link_idx; in smcr_buf_map_link()
2072 buf_desc, lnk->link_idx); in smcr_buf_map_link()
2078 buf_desc->is_map_ib[lnk->link_idx] = true; in smcr_buf_map_link()
2085 sg_free_table(&buf_desc->sgt[lnk->link_idx]); in smcr_buf_map_link()
2096 if (!buf_desc->is_reg_mr[link->link_idx]) { in smcr_link_reg_buf()
2099 buf_desc->mr[link->link_idx]->iova = in smcr_link_reg_buf()
2101 if (smc_wr_reg_send(link, buf_desc->mr[link->link_idx])) { in smcr_link_reg_buf()
2105 buf_desc->is_reg_mr[link->link_idx] = true; in smcr_link_reg_buf()
2467 void smc_rtoken_set(struct smc_link_group *lgr, int link_idx, int link_idx_new, in smc_rtoken_set() argument
2472 rtok_idx = smc_rtoken_find_by_link(lgr, link_idx, ntohl(nw_rkey_known)); in smc_rtoken_set()
2486 int link_idx; in smc_rtoken_set2() local
2488 for (link_idx = 0; link_idx < SMC_LINKS_PER_LGR_MAX; link_idx++) { in smc_rtoken_set2()
2489 if (lgr->lnk[link_idx].link_id == link_id) { in smc_rtoken_set2()
2496 lgr->rtokens[rtok_idx][link_idx].rkey = rkey; in smc_rtoken_set2()
2497 lgr->rtokens[rtok_idx][link_idx].dma_addr = dma_addr; in smc_rtoken_set2()
2509 if (lgr->rtokens[i][lnk->link_idx].rkey == rkey && in smc_rtoken_add()
2510 lgr->rtokens[i][lnk->link_idx].dma_addr == dma_addr && in smc_rtoken_add()
2519 lgr->rtokens[i][lnk->link_idx].rkey = rkey; in smc_rtoken_add()
2520 lgr->rtokens[i][lnk->link_idx].dma_addr = dma_addr; in smc_rtoken_add()
2532 if (lgr->rtokens[i][lnk->link_idx].rkey == rkey && in smc_rtoken_delete()