Lines Matching refs:mem_item
923 struct mem_entry *mem_item; in cuda_mem_cpu_map() local
931 mem_item = mem_list_find_item(hk); in cuda_mem_cpu_map()
932 if (mem_item == NULL) { in cuda_mem_cpu_map()
938 if (mem_item->mtype != GPU_MEM) { in cuda_mem_cpu_map()
944 if (mem_item->size != size) in cuda_mem_cpu_map()
947 size, mem_item->size); in cuda_mem_cpu_map()
949 if (gdrcopy_pin(&gdrc_h, &(mem_item->mh), (uint64_t)mem_item->ptr_d, in cuda_mem_cpu_map()
950 mem_item->size, &(mem_item->ptr_h))) { in cuda_mem_cpu_map()
956 mem_item->mtype = GPU_REGISTERED; in cuda_mem_cpu_map()
957 *ptr_out = mem_item->ptr_h; in cuda_mem_cpu_map()
966 struct mem_entry *mem_item; in cuda_mem_unregister() local
975 mem_item = mem_list_find_item(hk); in cuda_mem_unregister()
976 if (mem_item == NULL) { in cuda_mem_unregister()
982 if (mem_item->mtype == CPU_REGISTERED) { in cuda_mem_unregister()
995 rte_cuda_log(ERR, "Memory type %d not supported", mem_item->mtype); in cuda_mem_unregister()
1004 struct mem_entry *mem_item; in cuda_mem_cpu_unmap() local
1012 mem_item = mem_list_find_item(hk); in cuda_mem_cpu_unmap()
1013 if (mem_item == NULL) { in cuda_mem_cpu_unmap()
1019 if (mem_item->mtype == GPU_REGISTERED) { in cuda_mem_cpu_unmap()
1020 if (gdrcopy_unpin(gdrc_h, mem_item->mh, (void *)mem_item->ptr_d, in cuda_mem_cpu_unmap()
1021 mem_item->size)) { in cuda_mem_cpu_unmap()
1027 mem_item->mtype = GPU_MEM; in cuda_mem_cpu_unmap()
1040 struct mem_entry *mem_item; in cuda_mem_free() local
1049 mem_item = mem_list_find_item(hk); in cuda_mem_free()
1050 if (mem_item == NULL) { in cuda_mem_free()
1060 if (mem_item->mtype == GPU_REGISTERED) in cuda_mem_free()
1063 if (mem_item->mtype == GPU_MEM) { in cuda_mem_free()
1064 res = pfn_cuMemFree(mem_item->ptr_orig_d); in cuda_mem_free()
1076 rte_cuda_log(ERR, "Memory type %d not supported", mem_item->mtype); in cuda_mem_free()