Lines Matching refs:buf_slot
701 static int smc_ib_map_mr_sg(struct smc_buf_desc *buf_slot, u8 link_idx) in smc_ib_map_mr_sg() argument
707 sg_num = ib_map_mr_sg(buf_slot->mr[link_idx], in smc_ib_map_mr_sg()
708 buf_slot->sgt[link_idx].sgl, in smc_ib_map_mr_sg()
709 buf_slot->sgt[link_idx].orig_nents, in smc_ib_map_mr_sg()
717 struct smc_buf_desc *buf_slot, u8 link_idx) in smc_ib_get_memory_region() argument
719 if (buf_slot->mr[link_idx]) in smc_ib_get_memory_region()
722 buf_slot->mr[link_idx] = in smc_ib_get_memory_region()
723 ib_alloc_mr(pd, IB_MR_TYPE_MEM_REG, 1 << buf_slot->order); in smc_ib_get_memory_region()
724 if (IS_ERR(buf_slot->mr[link_idx])) { in smc_ib_get_memory_region()
727 rc = PTR_ERR(buf_slot->mr[link_idx]); in smc_ib_get_memory_region()
728 buf_slot->mr[link_idx] = NULL; in smc_ib_get_memory_region()
732 if (smc_ib_map_mr_sg(buf_slot, link_idx) != in smc_ib_get_memory_region()
733 buf_slot->sgt[link_idx].orig_nents) in smc_ib_get_memory_region()
740 struct smc_buf_desc *buf_slot) in smc_ib_is_sg_need_sync() argument
747 for_each_sg(buf_slot->sgt[lnk->link_idx].sgl, sg, in smc_ib_is_sg_need_sync()
748 buf_slot->sgt[lnk->link_idx].nents, i) { in smc_ib_is_sg_need_sync()
764 struct smc_buf_desc *buf_slot, in smc_ib_sync_sg_for_cpu() argument
770 if (!(buf_slot->is_dma_need_sync & (1U << lnk->link_idx))) in smc_ib_sync_sg_for_cpu()
774 for_each_sg(buf_slot->sgt[lnk->link_idx].sgl, sg, in smc_ib_sync_sg_for_cpu()
775 buf_slot->sgt[lnk->link_idx].nents, i) { in smc_ib_sync_sg_for_cpu()
787 struct smc_buf_desc *buf_slot, in smc_ib_sync_sg_for_device() argument
793 if (!(buf_slot->is_dma_need_sync & (1U << lnk->link_idx))) in smc_ib_sync_sg_for_device()
797 for_each_sg(buf_slot->sgt[lnk->link_idx].sgl, sg, in smc_ib_sync_sg_for_device()
798 buf_slot->sgt[lnk->link_idx].nents, i) { in smc_ib_sync_sg_for_device()
810 struct smc_buf_desc *buf_slot, in smc_ib_buf_map_sg() argument
816 buf_slot->sgt[lnk->link_idx].sgl, in smc_ib_buf_map_sg()
817 buf_slot->sgt[lnk->link_idx].orig_nents, in smc_ib_buf_map_sg()
826 struct smc_buf_desc *buf_slot, in smc_ib_buf_unmap_sg() argument
829 if (!buf_slot->sgt[lnk->link_idx].sgl->dma_address) in smc_ib_buf_unmap_sg()
833 buf_slot->sgt[lnk->link_idx].sgl, in smc_ib_buf_unmap_sg()
834 buf_slot->sgt[lnk->link_idx].orig_nents, in smc_ib_buf_unmap_sg()
836 buf_slot->sgt[lnk->link_idx].sgl->dma_address = 0; in smc_ib_buf_unmap_sg()