Hi Lei,
We didn’t try running VPP on Arm64 with 16K or 64K page size before.
From the error message and the below code, it’s probably because p->stack is 
not aligned to 64K boundary. It aligns to 4K by default.
Could you try “#define PAGE_SIZE_MULTIPLE 0x10000”?

   614 #ifdef CLIB_UNIX
   615   /* Pad to a multiple of the page size so we can mprotect process 
stacks */
   616 #define PAGE_SIZE_MULTIPLE 0x1000
   617 #define ALIGN_ON_MULTIPLE_PAGE_BOUNDARY_FOR_MPROTECT  __attribute__ 
((aligned (PAGE_SIZE_MULTIPLE)))
   618 #else
   619 #define ALIGN_ON_MULTIPLE_PAGE_BOUNDARY_FOR_MPROTECT
   620 #endif

Thanks.
From: [email protected] <[email protected]> On Behalf Of Lei Zhang via 
Lists.Fd.Io
Sent: 2019年11月22日 13:39
To: [email protected]
Cc: [email protected]
Subject: [vpp-dev] Support needed for ARM64 64k pagesize

  Hi,

    Anyone knows if VPP can support ARM64 64K pagesize?
   Or anyone has experiences on below issue?

   Thank you!

Here is the kernel config.
# CONFIG_ARM64_4K_PAGES is not set
# CONFIG_ARM64_16K_PAGES is not set
CONFIG_ARM64_64K_PAGES=y

    VPP reports a lot of errors when it starts up on ARM64 64k pagesize 
enviroment.

load_one_plugin:189: Loaded plugin: stn_plugin.so (VPP Steals the NIC for 
Container integration)
load_one_plugin:189: Loaded plugin: svs_plugin.so (Source VRF Select)
load_one_plugin:189: Loaded plugin: tlsopenssl_plugin.so (openssl based TLS 
Engine)
load_one_plugin:117: Plugin disabled (default): unittest_plugin.so
load_one_plugin:189: Loaded plugin: vmxnet3_plugin.so (VMWare Vmxnet3 Device 
Plugin)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)

     The source code of the error is at mprotect(). It seems that VPP memeory 
management may not support 64K pagesize.
#ifdef CLIB_UNIX
        /*
         * Disallow writes to the bottom page of the stack, to
         * catch stack overflows.
         */
        if (mprotect (p->stack, page_size, PROT_READ) < 0)
          clib_unix_warning ("process stack");
#endif
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14686): https://lists.fd.io/g/vpp-dev/message/14686
Mute This Topic: https://lists.fd.io/mt/61493265/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to