Lines Matching refs:link_idx
789 u8 link_idx, struct smc_init_info *ini) in smcr_link_init() argument
810 lnk->link_idx = link_idx; in smcr_link_init()
877 u8 link_idx; in smc_lgr_create() local
964 link_idx = SMC_SINGLE_LINK; in smc_lgr_create()
965 lnk = &lgr->lnk[link_idx]; in smc_lgr_create()
966 rc = smcr_link_init(lgr, lnk, link_idx, ini); in smc_lgr_create()
1091 if (!smc_link_active(&lgr->lnk[i]) || i == from_lnk->link_idx) in smc_switch_conns()
1280 buf_desc->is_reg_mr[lnk->link_idx] = false; in smcr_buf_unmap_link()
1281 if (!buf_desc->is_map_ib[lnk->link_idx]) in smcr_buf_unmap_link()
1285 buf_desc->mr[lnk->link_idx]) { in smcr_buf_unmap_link()
1286 smc_ib_put_memory_region(buf_desc->mr[lnk->link_idx]); in smcr_buf_unmap_link()
1287 buf_desc->mr[lnk->link_idx] = NULL; in smcr_buf_unmap_link()
1294 sg_free_table(&buf_desc->sgt[lnk->link_idx]); in smcr_buf_unmap_link()
1295 buf_desc->is_map_ib[lnk->link_idx] = false; in smcr_buf_unmap_link()
1325 lgr->rtokens[i][lnk->link_idx].rkey = 0; in smcr_rtoken_clear_link()
1326 lgr->rtokens[i][lnk->link_idx].dma_addr = 0; in smcr_rtoken_clear_link()
2127 if (buf_desc->is_map_ib[lnk->link_idx]) in smcr_buf_map_link()
2139 rc = sg_alloc_table(&buf_desc->sgt[lnk->link_idx], nents, GFP_KERNEL); in smcr_buf_map_link()
2145 for_each_sg(buf_desc->sgt[lnk->link_idx].sgl, sg, nents, i) { in smcr_buf_map_link()
2154 sg_set_buf(buf_desc->sgt[lnk->link_idx].sgl, in smcr_buf_map_link()
2168 smc_ib_is_sg_need_sync(lnk, buf_desc) << lnk->link_idx; in smcr_buf_map_link()
2177 buf_desc, lnk->link_idx); in smcr_buf_map_link()
2183 buf_desc->is_map_ib[lnk->link_idx] = true; in smcr_buf_map_link()
2190 sg_free_table(&buf_desc->sgt[lnk->link_idx]); in smcr_buf_map_link()
2201 if (!buf_desc->is_reg_mr[link->link_idx]) { in smcr_link_reg_buf()
2204 buf_desc->mr[link->link_idx]->iova = in smcr_link_reg_buf()
2206 if (smc_wr_reg_send(link, buf_desc->mr[link->link_idx])) { in smcr_link_reg_buf()
2210 buf_desc->is_reg_mr[link->link_idx] = true; in smcr_link_reg_buf()
2613 void smc_rtoken_set(struct smc_link_group *lgr, int link_idx, int link_idx_new, in smc_rtoken_set() argument
2618 rtok_idx = smc_rtoken_find_by_link(lgr, link_idx, ntohl(nw_rkey_known)); in smc_rtoken_set()
2632 int link_idx; in smc_rtoken_set2() local
2634 for (link_idx = 0; link_idx < SMC_LINKS_PER_LGR_MAX; link_idx++) { in smc_rtoken_set2()
2635 if (lgr->lnk[link_idx].link_id == link_id) { in smc_rtoken_set2()
2642 lgr->rtokens[rtok_idx][link_idx].rkey = rkey; in smc_rtoken_set2()
2643 lgr->rtokens[rtok_idx][link_idx].dma_addr = dma_addr; in smc_rtoken_set2()
2655 if (lgr->rtokens[i][lnk->link_idx].rkey == rkey && in smc_rtoken_add()
2656 lgr->rtokens[i][lnk->link_idx].dma_addr == dma_addr && in smc_rtoken_add()
2665 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()
2678 if (lgr->rtokens[i][lnk->link_idx].rkey == rkey && in smc_rtoken_delete()