Lines Matching refs:pi_mr
2451 struct mlx5_ib_mr *pi_mr = mr->mtt_mr; in mlx5_ib_map_mtt_mr_sg_pi() local
2454 pi_mr->mmkey.ndescs = 0; in mlx5_ib_map_mtt_mr_sg_pi()
2455 pi_mr->meta_ndescs = 0; in mlx5_ib_map_mtt_mr_sg_pi()
2456 pi_mr->meta_length = 0; in mlx5_ib_map_mtt_mr_sg_pi()
2458 ib_dma_sync_single_for_cpu(ibmr->device, pi_mr->desc_map, in mlx5_ib_map_mtt_mr_sg_pi()
2459 pi_mr->desc_size * pi_mr->max_descs, in mlx5_ib_map_mtt_mr_sg_pi()
2462 pi_mr->ibmr.page_size = ibmr->page_size; in mlx5_ib_map_mtt_mr_sg_pi()
2463 n = ib_sg_to_pages(&pi_mr->ibmr, data_sg, data_sg_nents, data_sg_offset, in mlx5_ib_map_mtt_mr_sg_pi()
2468 pi_mr->data_iova = pi_mr->ibmr.iova; in mlx5_ib_map_mtt_mr_sg_pi()
2469 pi_mr->data_length = pi_mr->ibmr.length; in mlx5_ib_map_mtt_mr_sg_pi()
2470 pi_mr->ibmr.length = pi_mr->data_length; in mlx5_ib_map_mtt_mr_sg_pi()
2471 ibmr->length = pi_mr->data_length; in mlx5_ib_map_mtt_mr_sg_pi()
2475 u64 iova = pi_mr->data_iova; in mlx5_ib_map_mtt_mr_sg_pi()
2477 n += ib_sg_to_pages(&pi_mr->ibmr, meta_sg, meta_sg_nents, in mlx5_ib_map_mtt_mr_sg_pi()
2480 pi_mr->meta_length = pi_mr->ibmr.length; in mlx5_ib_map_mtt_mr_sg_pi()
2487 pi_mr->pi_iova = (iova & page_mask) + in mlx5_ib_map_mtt_mr_sg_pi()
2488 pi_mr->mmkey.ndescs * ibmr->page_size + in mlx5_ib_map_mtt_mr_sg_pi()
2489 (pi_mr->ibmr.iova & ~page_mask); in mlx5_ib_map_mtt_mr_sg_pi()
2497 pi_mr->ibmr.length = pi_mr->pi_iova + pi_mr->meta_length - iova; in mlx5_ib_map_mtt_mr_sg_pi()
2498 pi_mr->ibmr.iova = iova; in mlx5_ib_map_mtt_mr_sg_pi()
2499 ibmr->length += pi_mr->meta_length; in mlx5_ib_map_mtt_mr_sg_pi()
2502 ib_dma_sync_single_for_device(ibmr->device, pi_mr->desc_map, in mlx5_ib_map_mtt_mr_sg_pi()
2503 pi_mr->desc_size * pi_mr->max_descs, in mlx5_ib_map_mtt_mr_sg_pi()
2516 struct mlx5_ib_mr *pi_mr = mr->klm_mr; in mlx5_ib_map_klm_mr_sg_pi() local
2519 pi_mr->mmkey.ndescs = 0; in mlx5_ib_map_klm_mr_sg_pi()
2520 pi_mr->meta_ndescs = 0; in mlx5_ib_map_klm_mr_sg_pi()
2521 pi_mr->meta_length = 0; in mlx5_ib_map_klm_mr_sg_pi()
2523 ib_dma_sync_single_for_cpu(ibmr->device, pi_mr->desc_map, in mlx5_ib_map_klm_mr_sg_pi()
2524 pi_mr->desc_size * pi_mr->max_descs, in mlx5_ib_map_klm_mr_sg_pi()
2527 n = mlx5_ib_sg_to_klms(pi_mr, data_sg, data_sg_nents, data_sg_offset, in mlx5_ib_map_klm_mr_sg_pi()
2530 ib_dma_sync_single_for_device(ibmr->device, pi_mr->desc_map, in mlx5_ib_map_klm_mr_sg_pi()
2531 pi_mr->desc_size * pi_mr->max_descs, in mlx5_ib_map_klm_mr_sg_pi()
2535 pi_mr->data_iova = 0; in mlx5_ib_map_klm_mr_sg_pi()
2536 pi_mr->ibmr.iova = 0; in mlx5_ib_map_klm_mr_sg_pi()
2537 pi_mr->pi_iova = pi_mr->data_length; in mlx5_ib_map_klm_mr_sg_pi()
2538 ibmr->length = pi_mr->ibmr.length; in mlx5_ib_map_klm_mr_sg_pi()
2549 struct mlx5_ib_mr *pi_mr = NULL; in mlx5_ib_map_mr_sg_pi() local
2578 pi_mr = mr->mtt_mr; in mlx5_ib_map_mr_sg_pi()
2585 pi_mr = mr->klm_mr; in mlx5_ib_map_mr_sg_pi()
2595 mr->pi_mr = pi_mr; in mlx5_ib_map_mr_sg_pi()
2596 if (pi_mr) in mlx5_ib_map_mr_sg_pi()
2597 ibmr->sig_attrs->meta_length = pi_mr->meta_length; in mlx5_ib_map_mr_sg_pi()