pci: fix build for FreeBSD
[dpdk.git] / lib / librte_eal / linuxapp / eal / include / eal_hugepages.h
index 16b3b5f..064cdb0 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without
@@ -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 */
 };