Lines Matching refs:pi_mr
2157 struct mlx5_ib_mr *pi_mr = mr->mtt_mr; in mlx5_ib_map_mtt_mr_sg_pi() local
2160 pi_mr->ndescs = 0; in mlx5_ib_map_mtt_mr_sg_pi()
2161 pi_mr->meta_ndescs = 0; in mlx5_ib_map_mtt_mr_sg_pi()
2162 pi_mr->meta_length = 0; in mlx5_ib_map_mtt_mr_sg_pi()
2164 ib_dma_sync_single_for_cpu(ibmr->device, pi_mr->desc_map, in mlx5_ib_map_mtt_mr_sg_pi()
2165 pi_mr->desc_size * pi_mr->max_descs, in mlx5_ib_map_mtt_mr_sg_pi()
2168 pi_mr->ibmr.page_size = ibmr->page_size; in mlx5_ib_map_mtt_mr_sg_pi()
2169 n = ib_sg_to_pages(&pi_mr->ibmr, data_sg, data_sg_nents, data_sg_offset, in mlx5_ib_map_mtt_mr_sg_pi()
2174 pi_mr->data_iova = pi_mr->ibmr.iova; in mlx5_ib_map_mtt_mr_sg_pi()
2175 pi_mr->data_length = pi_mr->ibmr.length; in mlx5_ib_map_mtt_mr_sg_pi()
2176 pi_mr->ibmr.length = pi_mr->data_length; in mlx5_ib_map_mtt_mr_sg_pi()
2177 ibmr->length = pi_mr->data_length; in mlx5_ib_map_mtt_mr_sg_pi()
2181 u64 iova = pi_mr->data_iova; in mlx5_ib_map_mtt_mr_sg_pi()
2183 n += ib_sg_to_pages(&pi_mr->ibmr, meta_sg, meta_sg_nents, in mlx5_ib_map_mtt_mr_sg_pi()
2186 pi_mr->meta_length = pi_mr->ibmr.length; in mlx5_ib_map_mtt_mr_sg_pi()
2193 pi_mr->pi_iova = (iova & page_mask) + in mlx5_ib_map_mtt_mr_sg_pi()
2194 pi_mr->ndescs * ibmr->page_size + in mlx5_ib_map_mtt_mr_sg_pi()
2195 (pi_mr->ibmr.iova & ~page_mask); in mlx5_ib_map_mtt_mr_sg_pi()
2203 pi_mr->ibmr.length = pi_mr->pi_iova + pi_mr->meta_length - iova; in mlx5_ib_map_mtt_mr_sg_pi()
2204 pi_mr->ibmr.iova = iova; in mlx5_ib_map_mtt_mr_sg_pi()
2205 ibmr->length += pi_mr->meta_length; in mlx5_ib_map_mtt_mr_sg_pi()
2208 ib_dma_sync_single_for_device(ibmr->device, pi_mr->desc_map, in mlx5_ib_map_mtt_mr_sg_pi()
2209 pi_mr->desc_size * pi_mr->max_descs, in mlx5_ib_map_mtt_mr_sg_pi()
2222 struct mlx5_ib_mr *pi_mr = mr->klm_mr; in mlx5_ib_map_klm_mr_sg_pi() local
2225 pi_mr->ndescs = 0; in mlx5_ib_map_klm_mr_sg_pi()
2226 pi_mr->meta_ndescs = 0; in mlx5_ib_map_klm_mr_sg_pi()
2227 pi_mr->meta_length = 0; in mlx5_ib_map_klm_mr_sg_pi()
2229 ib_dma_sync_single_for_cpu(ibmr->device, pi_mr->desc_map, in mlx5_ib_map_klm_mr_sg_pi()
2230 pi_mr->desc_size * pi_mr->max_descs, in mlx5_ib_map_klm_mr_sg_pi()
2233 n = mlx5_ib_sg_to_klms(pi_mr, data_sg, data_sg_nents, data_sg_offset, in mlx5_ib_map_klm_mr_sg_pi()
2236 ib_dma_sync_single_for_device(ibmr->device, pi_mr->desc_map, in mlx5_ib_map_klm_mr_sg_pi()
2237 pi_mr->desc_size * pi_mr->max_descs, in mlx5_ib_map_klm_mr_sg_pi()
2241 pi_mr->data_iova = 0; in mlx5_ib_map_klm_mr_sg_pi()
2242 pi_mr->ibmr.iova = 0; in mlx5_ib_map_klm_mr_sg_pi()
2243 pi_mr->pi_iova = pi_mr->data_length; in mlx5_ib_map_klm_mr_sg_pi()
2244 ibmr->length = pi_mr->ibmr.length; in mlx5_ib_map_klm_mr_sg_pi()
2255 struct mlx5_ib_mr *pi_mr = NULL; in mlx5_ib_map_mr_sg_pi() local
2284 pi_mr = mr->mtt_mr; in mlx5_ib_map_mr_sg_pi()
2291 pi_mr = mr->klm_mr; in mlx5_ib_map_mr_sg_pi()
2301 mr->pi_mr = pi_mr; in mlx5_ib_map_mr_sg_pi()
2302 if (pi_mr) in mlx5_ib_map_mr_sg_pi()
2303 ibmr->sig_attrs->meta_length = pi_mr->meta_length; in mlx5_ib_map_mr_sg_pi()