Lines Matching refs:list_idx

236 		unsigned int list_idx __rte_unused,  in get_seg_memfd()
248 fd = fd_list[list_idx].memseg_list_fd; in get_seg_memfd()
251 snprintf(segname, sizeof(segname), "seg_%i", list_idx); in get_seg_memfd()
258 fd_list[list_idx].memseg_list_fd = fd; in get_seg_memfd()
261 fd = fd_list[list_idx].fds[seg_idx]; in get_seg_memfd()
265 list_idx, seg_idx); in get_seg_memfd()
272 fd_list[list_idx].fds[seg_idx] = fd; in get_seg_memfd()
282 unsigned int list_idx, unsigned int seg_idx, in get_seg_fd() argument
299 return get_seg_memfd(hi, list_idx, seg_idx); in get_seg_fd()
302 out_fd = &fd_list[list_idx].memseg_list_fd; in get_seg_fd()
303 eal_get_hugefile_path(path, buflen, hi->hugedir, list_idx); in get_seg_fd()
305 out_fd = &fd_list[list_idx].fds[seg_idx]; in get_seg_fd()
307 list_idx * RTE_MAX_MEMSEG_PER_LIST + seg_idx); in get_seg_fd()
475 close_hugefile(int fd, char *path, int list_idx) in close_hugefile() argument
490 fd_list[list_idx].memseg_list_fd = -1; in close_hugefile()
516 struct hugepage_info *hi, unsigned int list_idx, in alloc_seg() argument
569 fd = get_seg_fd(path, sizeof(path), hi, list_idx, seg_idx, in alloc_seg()
583 fd_list[list_idx].count++; in alloc_seg()
710 fd_list[list_idx].count--; in alloc_seg()
721 if (fd_list[list_idx].count == 0) in alloc_seg()
722 close_hugefile(fd, path, list_idx); in alloc_seg()
730 fd_list[list_idx].fds[seg_idx] = -1; in alloc_seg()
737 unsigned int list_idx, unsigned int seg_idx) in free_seg() argument
767 fd = get_seg_fd(path, sizeof(path), hi, list_idx, seg_idx, NULL); in free_seg()
776 if (--(fd_list[list_idx].count) == 0) in free_seg()
777 close_hugefile(fd, path, list_idx); in free_seg()
796 fd_list[list_idx].fds[seg_idx] = -1; in free_seg()
1492 alloc_list(int list_idx, int len) in alloc_list() argument
1510 fd_list[list_idx].fds = data; in alloc_list()
1511 fd_list[list_idx].len = len; in alloc_list()
1513 fd_list[list_idx].fds = NULL; in alloc_list()
1514 fd_list[list_idx].len = 0; in alloc_list()
1517 fd_list[list_idx].count = 0; in alloc_list()
1518 fd_list[list_idx].memseg_list_fd = -1; in alloc_list()
1524 destroy_list(int list_idx) in destroy_list() argument
1531 int *fds = fd_list[list_idx].fds; in destroy_list()
1534 for (i = 0; i < fd_list[list_idx].len; i++) { in destroy_list()
1541 fd_list[list_idx].fds = NULL; in destroy_list()
1542 fd_list[list_idx].len = 0; in destroy_list()
1543 } else if (fd_list[list_idx].memseg_list_fd >= 0) { in destroy_list()
1544 close(fd_list[list_idx].memseg_list_fd); in destroy_list()
1545 fd_list[list_idx].count = 0; in destroy_list()
1546 fd_list[list_idx].memseg_list_fd = -1; in destroy_list()
1583 eal_memalloc_set_seg_fd(int list_idx, int seg_idx, int fd) in eal_memalloc_set_seg_fd() argument
1594 if (fd_list[list_idx].len == 0) { in eal_memalloc_set_seg_fd()
1595 int len = mcfg->memsegs[list_idx].memseg_arr.len; in eal_memalloc_set_seg_fd()
1597 if (alloc_list(list_idx, len) < 0) in eal_memalloc_set_seg_fd()
1600 fd_list[list_idx].fds[seg_idx] = fd; in eal_memalloc_set_seg_fd()
1606 eal_memalloc_set_seg_list_fd(int list_idx, int fd) in eal_memalloc_set_seg_list_fd() argument
1615 fd_list[list_idx].memseg_list_fd = fd; in eal_memalloc_set_seg_list_fd()
1621 eal_memalloc_get_seg_fd(int list_idx, int seg_idx) in eal_memalloc_get_seg_fd() argument
1638 fd = fd_list[list_idx].memseg_list_fd; in eal_memalloc_get_seg_fd()
1639 } else if (fd_list[list_idx].len == 0) { in eal_memalloc_get_seg_fd()
1643 fd = fd_list[list_idx].fds[seg_idx]; in eal_memalloc_get_seg_fd()
1682 eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset) in eal_memalloc_get_seg_fd_offset() argument
1699 size_t pgsz = mcfg->memsegs[list_idx].page_sz; in eal_memalloc_get_seg_fd_offset()
1702 if (fd_list[list_idx].memseg_list_fd < 0) in eal_memalloc_get_seg_fd_offset()
1707 if (fd_list[list_idx].len == 0) in eal_memalloc_get_seg_fd_offset()
1711 if (fd_list[list_idx].fds[seg_idx] < 0) in eal_memalloc_get_seg_fd_offset()