]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/linuxapp/eal/eal.c
mem: add huge page sizes for IBM Power
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal.c
index 68cae884a8f179737773e439c85d83f300e83e78..1d1fbdd3a8a220e9dfd0e768096e640515144345 100644 (file)
@@ -453,9 +453,12 @@ eal_parse_base_virtaddr(const char *arg)
                return -1;
 #endif
 
-       /* align the addr on 2M boundary */
-       internal_config.base_virtaddr = RTE_PTR_ALIGN_CEIL((uintptr_t)addr,
-                                                          RTE_PGSIZE_2M);
+       /* align the addr on 16M boundary, 16MB is the minimum huge page
+        * size on IBM Power architecture. If the addr is aligned to 16MB,
+        * it can align to 2MB for x86. So this alignment can also be used
+        * on x86 */
+       internal_config.base_virtaddr =
+               RTE_PTR_ALIGN_CEIL((uintptr_t)addr, RTE_PGSIZE_16M);
 
        return 0;
 }