Lines Matching refs:mkc

59 static void set_mkc_access_pd_addr_fields(void *mkc, int acc, u64 start_addr,  in set_mkc_access_pd_addr_fields()  argument
64 MLX5_SET(mkc, mkc, a, !!(acc & IB_ACCESS_REMOTE_ATOMIC)); in set_mkc_access_pd_addr_fields()
65 MLX5_SET(mkc, mkc, rw, !!(acc & IB_ACCESS_REMOTE_WRITE)); in set_mkc_access_pd_addr_fields()
66 MLX5_SET(mkc, mkc, rr, !!(acc & IB_ACCESS_REMOTE_READ)); in set_mkc_access_pd_addr_fields()
67 MLX5_SET(mkc, mkc, lw, !!(acc & IB_ACCESS_LOCAL_WRITE)); in set_mkc_access_pd_addr_fields()
68 MLX5_SET(mkc, mkc, lr, 1); in set_mkc_access_pd_addr_fields()
73 MLX5_SET(mkc, mkc, relaxed_ordering_write, 1); in set_mkc_access_pd_addr_fields()
75 MLX5_SET(mkc, mkc, relaxed_ordering_read, 1); in set_mkc_access_pd_addr_fields()
78 MLX5_SET(mkc, mkc, pd, to_mpd(pd)->pdn); in set_mkc_access_pd_addr_fields()
79 MLX5_SET(mkc, mkc, qpn, 0xffffff); in set_mkc_access_pd_addr_fields()
80 MLX5_SET64(mkc, mkc, start_addr, start_addr); in set_mkc_access_pd_addr_fields()
86 void *mkc; in assign_mkey_variant() local
88 mkc = MLX5_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); in assign_mkey_variant()
89 MLX5_SET(mkc, mkc, mkey_7_0, key); in assign_mkey_variant()
290 static void set_cache_mkc(struct mlx5_cache_ent *ent, void *mkc) in set_cache_mkc() argument
292 set_mkc_access_pd_addr_fields(mkc, 0, 0, ent->dev->umrc.pd); in set_cache_mkc()
293 MLX5_SET(mkc, mkc, free, 1); in set_cache_mkc()
294 MLX5_SET(mkc, mkc, umr_en, 1); in set_cache_mkc()
295 MLX5_SET(mkc, mkc, access_mode_1_0, ent->access_mode & 0x3); in set_cache_mkc()
296 MLX5_SET(mkc, mkc, access_mode_4_2, (ent->access_mode >> 2) & 0x7); in set_cache_mkc()
298 MLX5_SET(mkc, mkc, translations_octword_size, in set_cache_mkc()
300 MLX5_SET(mkc, mkc, log_page_size, ent->page); in set_cache_mkc()
307 void *mkc; in add_keys() local
316 mkc = MLX5_ADDR_OF(create_mkey_in, async_create->in, in add_keys()
318 set_cache_mkc(ent, mkc); in add_keys()
347 void *mkc; in create_cache_mkey() local
354 mkc = MLX5_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); in create_cache_mkey()
355 set_cache_mkc(ent, mkc); in create_cache_mkey()
820 void *mkc; in mlx5_ib_get_dma_mr() local
834 mkc = MLX5_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); in mlx5_ib_get_dma_mr()
836 MLX5_SET(mkc, mkc, access_mode_1_0, MLX5_MKC_ACCESS_MODE_PA); in mlx5_ib_get_dma_mr()
837 MLX5_SET(mkc, mkc, length64, 1); in mlx5_ib_get_dma_mr()
838 set_mkc_access_pd_addr_fields(mkc, acc | IB_ACCESS_RELAXED_ORDERING, 0, in mlx5_ib_get_dma_mr()
927 page_size = mlx5_umem_find_best_pgsz(umem, mkc, log_page_size, in alloc_cacheable_mr()
969 void *mkc; in reg_create() local
1008 mkc = MLX5_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); in reg_create()
1009 set_mkc_access_pd_addr_fields(mkc, access_flags, iova, in reg_create()
1011 MLX5_SET(mkc, mkc, free, !populate); in reg_create()
1012 MLX5_SET(mkc, mkc, access_mode_1_0, MLX5_MKC_ACCESS_MODE_MTT); in reg_create()
1013 MLX5_SET(mkc, mkc, umr_en, 1); in reg_create()
1015 MLX5_SET64(mkc, mkc, len, umem->length); in reg_create()
1016 MLX5_SET(mkc, mkc, bsf_octword_size, 0); in reg_create()
1017 MLX5_SET(mkc, mkc, translations_octword_size, in reg_create()
1019 MLX5_SET(mkc, mkc, log_page_size, mr->page_shift); in reg_create()
1021 MLX5_SET(mkc, mkc, ma_translation_mode, 1); in reg_create()
1054 void *mkc; in mlx5_ib_get_dm_mr() local
1068 mkc = MLX5_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); in mlx5_ib_get_dm_mr()
1070 MLX5_SET(mkc, mkc, access_mode_1_0, mode & 0x3); in mlx5_ib_get_dm_mr()
1071 MLX5_SET(mkc, mkc, access_mode_4_2, (mode >> 2) & 0x7); in mlx5_ib_get_dm_mr()
1072 MLX5_SET64(mkc, mkc, len, length); in mlx5_ib_get_dm_mr()
1073 set_mkc_access_pd_addr_fields(mkc, acc, start_addr, pd); in mlx5_ib_get_dm_mr()
1156 umem, mkc, log_page_size, 0, iova); in create_real_mr()
1372 mlx5_umem_find_best_pgsz(new_umem, mkc, log_page_size, 0, iova); in can_use_umr_rereg_pas()
1652 void *mkc; in mlx5_set_umr_free_mkey() local
1654 mkc = MLX5_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); in mlx5_set_umr_free_mkey()
1657 set_mkc_access_pd_addr_fields(mkc, IB_ACCESS_RELAXED_ORDERING, 0, pd); in mlx5_set_umr_free_mkey()
1658 MLX5_SET(mkc, mkc, free, 1); in mlx5_set_umr_free_mkey()
1659 MLX5_SET(mkc, mkc, translations_octword_size, ndescs); in mlx5_set_umr_free_mkey()
1660 MLX5_SET(mkc, mkc, access_mode_1_0, access_mode & 0x3); in mlx5_set_umr_free_mkey()
1661 MLX5_SET(mkc, mkc, access_mode_4_2, (access_mode >> 2) & 0x7); in mlx5_set_umr_free_mkey()
1662 MLX5_SET(mkc, mkc, umr_en, 1); in mlx5_set_umr_free_mkey()
1663 MLX5_SET(mkc, mkc, log_page_size, page_shift); in mlx5_set_umr_free_mkey()
1763 void *mkc; in mlx5_alloc_integrity_descs() local
1798 mkc = MLX5_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); in mlx5_alloc_integrity_descs()
1799 MLX5_SET(mkc, mkc, bsf_en, 1); in mlx5_alloc_integrity_descs()
1800 MLX5_SET(mkc, mkc, bsf_octword_size, MLX5_MKEY_BSF_OCTO_SIZE); in mlx5_alloc_integrity_descs()
1909 void *mkc; in mlx5_ib_alloc_mw() local
1937 mkc = MLX5_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); in mlx5_ib_alloc_mw()
1939 MLX5_SET(mkc, mkc, free, 1); in mlx5_ib_alloc_mw()
1940 MLX5_SET(mkc, mkc, translations_octword_size, ndescs); in mlx5_ib_alloc_mw()
1941 MLX5_SET(mkc, mkc, pd, to_mpd(ibmw->pd)->pdn); in mlx5_ib_alloc_mw()
1942 MLX5_SET(mkc, mkc, umr_en, 1); in mlx5_ib_alloc_mw()
1943 MLX5_SET(mkc, mkc, lr, 1); in mlx5_ib_alloc_mw()
1944 MLX5_SET(mkc, mkc, access_mode_1_0, MLX5_MKC_ACCESS_MODE_KLMS); in mlx5_ib_alloc_mw()
1945 MLX5_SET(mkc, mkc, en_rinval, !!((ibmw->type == IB_MW_TYPE_2))); in mlx5_ib_alloc_mw()
1946 MLX5_SET(mkc, mkc, qpn, 0xffffff); in mlx5_ib_alloc_mw()