#include <rte_memzone.h>
#include <rte_os.h>
+#include "eal_private.h"
#include "eal_filesystem.h"
#include "eal_hugepages.h"
#include "eal_internal_cfg.h"
goto exit;
}
+ /* AdjustTokenPrivileges() may succeed with ERROR_NOT_ALL_ASSIGNED. */
+ if (GetLastError() != ERROR_SUCCESS)
+ goto exit;
+
ret = 0;
exit:
struct hugepage_info *hpi;
unsigned int socket_id;
int ret = 0;
+ struct internal_config *internal_conf =
+ eal_get_internal_configuration();
/* Only one hugepage size available on Windows. */
- internal_config.num_hugepage_sizes = 1;
- hpi = &internal_config.hugepage_info[0];
+ internal_conf->num_hugepage_sizes = 1;
+ hpi = &internal_conf->hugepage_info[0];
hpi->hugepage_sz = GetLargePageMinimum();
if (hpi->hugepage_sz == 0)
eal_hugepage_info_init(void)
{
if (hugepage_claim_privilege() < 0) {
- RTE_LOG(ERR, EAL, "Cannot claim hugepage privilege\n");
+ RTE_LOG(ERR, EAL, "Cannot claim hugepage privilege\n"
+ "Verify that large-page support privilege is assigned to the current user\n");
return -1;
}
if (hugepage_info_init() < 0) {
- RTE_LOG(ERR, EAL, "Cannot get hugepage information\n");
+ RTE_LOG(ERR, EAL, "Cannot discover available hugepages\n");
return -1;
}