Lines Matching refs:wa
817 struct alloc_walk_param *wa = arg; in alloc_seg_walk() local
825 if (msl->page_sz != wa->page_sz) in alloc_seg_walk()
827 if (msl->socket_id != wa->socket) in alloc_seg_walk()
835 need = wa->n_segs; in alloc_seg_walk()
838 if (wa->exact) { in alloc_seg_walk()
873 if (wa->hi->lock_descriptor == -1 && !internal_conf->in_memory) { in alloc_seg_walk()
874 dir_fd = open(wa->hi->hugedir, O_RDONLY); in alloc_seg_walk()
877 __func__, wa->hi->hugedir, strerror(errno)); in alloc_seg_walk()
883 __func__, wa->hi->hugedir, strerror(errno)); in alloc_seg_walk()
897 if (alloc_seg(cur, map_addr, wa->socket, wa->hi, in alloc_seg_walk()
903 if (!wa->exact) in alloc_seg_walk()
918 if (free_seg(tmp, wa->hi, msl_idx, j)) in alloc_seg_walk()
922 if (wa->ms) in alloc_seg_walk()
923 memset(wa->ms, 0, sizeof(*wa->ms) * wa->n_segs); in alloc_seg_walk()
929 if (wa->ms) in alloc_seg_walk()
930 wa->ms[i] = cur; in alloc_seg_walk()
935 wa->segs_allocated = i; in alloc_seg_walk()
953 struct free_walk_param *wa = arg; in free_seg_walk() local
962 if ((uintptr_t)wa->ms->addr < start_addr || in free_seg_walk()
963 (uintptr_t)wa->ms->addr >= end_addr) in free_seg_walk()
967 seg_idx = RTE_PTR_DIFF(wa->ms->addr, start_addr) / msl->page_sz; in free_seg_walk()
980 if (wa->hi->lock_descriptor == -1 && !internal_conf->in_memory) { in free_seg_walk()
981 dir_fd = open(wa->hi->hugedir, O_RDONLY); in free_seg_walk()
984 __func__, wa->hi->hugedir, strerror(errno)); in free_seg_walk()
990 __func__, wa->hi->hugedir, strerror(errno)); in free_seg_walk()
1000 ret = free_seg(wa->ms, wa->hi, msl_idx, seg_idx); in free_seg_walk()
1021 struct alloc_walk_param wa; in eal_memalloc_alloc_seg_bulk() local
1026 memset(&wa, 0, sizeof(wa)); in eal_memalloc_alloc_seg_bulk()
1053 wa.exact = exact; in eal_memalloc_alloc_seg_bulk()
1054 wa.hi = hi; in eal_memalloc_alloc_seg_bulk()
1055 wa.ms = ms; in eal_memalloc_alloc_seg_bulk()
1056 wa.n_segs = n_segs; in eal_memalloc_alloc_seg_bulk()
1057 wa.page_sz = page_sz; in eal_memalloc_alloc_seg_bulk()
1058 wa.socket = socket; in eal_memalloc_alloc_seg_bulk()
1059 wa.segs_allocated = 0; in eal_memalloc_alloc_seg_bulk()
1062 ret = rte_memseg_list_walk_thread_unsafe(alloc_seg_walk, &wa); in eal_memalloc_alloc_seg_bulk()
1068 ret = (int)wa.segs_allocated; in eal_memalloc_alloc_seg_bulk()
1102 struct free_walk_param wa; in eal_memalloc_free_seg_bulk() local
1112 memset(&wa, 0, sizeof(wa)); in eal_memalloc_free_seg_bulk()
1126 wa.ms = cur; in eal_memalloc_free_seg_bulk()
1127 wa.hi = hi; in eal_memalloc_free_seg_bulk()
1132 &wa); in eal_memalloc_free_seg_bulk()