ivshmem: library changes for mmaping using ivshmem
[dpdk.git] / lib / librte_eal / linuxapp / eal / include / eal_hugepages.h
index 82dd641..064cdb0 100644 (file)
@@ -35,6 +35,8 @@
 #define RTE_LINUXAPP_HUGEPAGES_H_
 
 #include <stddef.h>
+#include <stdint.h>
+#include <limits.h>
 
 #define MAX_HUGEPAGE_PATH PATH_MAX
 
@@ -42,7 +44,7 @@
  * Structure used to store informations about hugepages that we mapped
  * through the files in hugetlbfs.
  */
-struct hugepage {
+struct hugepage_file {
        void *orig_va;      /**< virtual addr of first mmap() */
        void *final_va;     /**< virtual addr of 2nd mmap() */
        uint64_t physaddr;  /**< physical addr */
@@ -50,6 +52,9 @@ struct hugepage {
        int socket_id;      /**< NUMA socket ID */
        int file_id;        /**< the '%d' in HUGEFILE_FMT */
        int memseg_id;      /**< the memory segment to which page belongs */
+#ifdef RTE_EAL_SINGLE_FILE_SEGMENTS
+       int repeated;           /**< number of times the page size is repeated */
+#endif
        char filepath[MAX_HUGEPAGE_PATH]; /**< path to backing file on filesystem */
 };