]> git.proxmox.com Git - ceph.git/blame - ceph/src/seastar/dpdk/lib/librte_eal/common/eal_hugepages.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / seastar / dpdk / lib / librte_eal / common / eal_hugepages.h
CommitLineData
9f95a23c
TL
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
7c673cae
FG
3 */
4
5#ifndef EAL_HUGEPAGES_H
6#define EAL_HUGEPAGES_H
7
8#include <stddef.h>
9#include <stdint.h>
10#include <limits.h>
11
12#define MAX_HUGEPAGE_PATH PATH_MAX
13
14/**
15 * Structure used to store informations about hugepages that we mapped
16 * through the files in hugetlbfs.
17 */
18struct hugepage_file {
19 void *orig_va; /**< virtual addr of first mmap() */
20 void *final_va; /**< virtual addr of 2nd mmap() */
21 uint64_t physaddr; /**< physical addr */
22 size_t size; /**< the page size */
23 int socket_id; /**< NUMA socket ID */
24 int file_id; /**< the '%d' in HUGEFILE_FMT */
7c673cae
FG
25 char filepath[MAX_HUGEPAGE_PATH]; /**< path to backing file on filesystem */
26};
27
28/**
9f95a23c
TL
29 * Read the information on what hugepages are available for the EAL to use,
30 * clearing out any unused ones.
7c673cae
FG
31 */
32int eal_hugepage_info_init(void);
33
9f95a23c
TL
34/**
35 * Read whatever information primary process has shared about hugepages into
36 * secondary process.
37 */
38int eal_hugepage_info_read(void);
39
7c673cae 40#endif /* EAL_HUGEPAGES_H */