Lines Matching refs:mr
162 struct mlx5_ib_mr *mr, u8 flags, bool atomic) in set_reg_umr_seg() argument
164 int size = (mr->mmkey.ndescs + mr->meta_ndescs) * mr->desc_size; in set_reg_umr_seg()
190 struct mlx5_ib_mr *mr, in set_reg_mkey_seg() argument
193 int ndescs = ALIGN(mr->mmkey.ndescs + mr->meta_ndescs, 8) >> 1; in set_reg_mkey_seg()
197 if (mr->access_mode == MLX5_MKC_ACCESS_MODE_MTT) in set_reg_mkey_seg()
198 seg->log2_page_size = ilog2(mr->ibmr.page_size); in set_reg_mkey_seg()
199 else if (mr->access_mode == MLX5_MKC_ACCESS_MODE_KLMS) in set_reg_mkey_seg()
203 seg->flags = get_umr_flags(access) | mr->access_mode; in set_reg_mkey_seg()
206 seg->start_addr = cpu_to_be64(mr->ibmr.iova); in set_reg_mkey_seg()
207 seg->len = cpu_to_be64(mr->ibmr.length); in set_reg_mkey_seg()
218 struct mlx5_ib_mr *mr, in set_reg_data_seg() argument
221 int bcount = mr->desc_size * (mr->mmkey.ndescs + mr->meta_ndescs); in set_reg_data_seg()
223 dseg->addr = cpu_to_be64(mr->desc_map); in set_reg_data_seg()
432 struct mlx5_ib_mr *mr = to_mmr(sig_mr); in set_sig_data_segment() local
433 struct mlx5_ib_mr *pi_mr = mr->pi_mr; in set_sig_data_segment()
562 struct mlx5_ib_mr *sig_mr = to_mmr(wr->mr); in set_pi_umr_wr()
593 set_sig_mkey_segment(*seg, wr->mr, wr->access, xlt_size, region_len, in set_pi_umr_wr()
599 ret = set_sig_data_segment(send_wr, wr->mr, sig_attrs, qp, seg, size, in set_pi_umr_wr()
640 struct mlx5_ib_mr *mr = to_mmr(wr->mr); in set_reg_wr() local
643 int mr_list_size = (mr->mmkey.ndescs + mr->meta_ndescs) * mr->desc_size; in set_reg_wr()
670 set_reg_umr_seg(*seg, mr, flags, atomic); in set_reg_wr()
675 set_reg_mkey_seg(*seg, mr, wr->key, wr->access); in set_reg_wr()
681 mlx5r_memcpy_send_wqe(&qp->sq, cur_edge, seg, size, mr->descs, in set_reg_wr()
685 set_reg_data_seg(*seg, mr, pd); in set_reg_wr()
851 struct mlx5_ib_mr *mr; in handle_reg_mr_integrity() local
860 mr = to_mmr(reg_wr(wr)->mr); in handle_reg_mr_integrity()
861 pi_mr = mr->pi_mr; in handle_reg_mr_integrity()
867 reg_pi_wr.mr = &pi_mr->ibmr; in handle_reg_mr_integrity()
889 pa_pi_mr.ibmr.lkey = mr->ibmr.pd->local_dma_lkey; in handle_reg_mr_integrity()
890 pa_pi_mr.mmkey.ndescs = mr->mmkey.ndescs; in handle_reg_mr_integrity()
891 pa_pi_mr.data_length = mr->data_length; in handle_reg_mr_integrity()
892 pa_pi_mr.data_iova = mr->data_iova; in handle_reg_mr_integrity()
893 if (mr->meta_ndescs) { in handle_reg_mr_integrity()
894 pa_pi_mr.meta_ndescs = mr->meta_ndescs; in handle_reg_mr_integrity()
895 pa_pi_mr.meta_length = mr->meta_length; in handle_reg_mr_integrity()
896 pa_pi_mr.pi_iova = mr->pi_iova; in handle_reg_mr_integrity()
899 pa_pi_mr.ibmr.length = mr->ibmr.length; in handle_reg_mr_integrity()
900 mr->pi_mr = &pa_pi_mr; in handle_reg_mr_integrity()
902 (*ctrl)->imm = cpu_to_be32(mr->ibmr.rkey); in handle_reg_mr_integrity()
912 sig_attrs = mr->ibmr.sig_attrs; in handle_reg_mr_integrity()
914 &sig_attrs->mem, mr->sig->psv_memory.psv_idx, in handle_reg_mr_integrity()
920 &sig_attrs->wire, mr->sig->psv_wire.psv_idx, in handle_reg_mr_integrity()