net/xenvirt: support dynamic page size
authorRicardo Salveti <ricardo.salveti@linaro.org>
Mon, 18 Apr 2016 03:06:06 +0000 (00:06 -0300)
committerBruce Richardson <bruce.richardson@intel.com>
Thu, 23 Jun 2016 10:45:07 +0000 (12:45 +0200)
PAGE_SIZE constant is not defined on ARM since multiple values
are possible, so DPDK needs to dynamically get the page size.

Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/net/xenvirt/rte_eth_xenvirt.c

index 1adeb5b..3e45808 100644 (file)
@@ -39,6 +39,9 @@
 #include <sys/mman.h>
 #include <errno.h>
 #include <sys/user.h>
+#ifndef PAGE_SIZE
+#define PAGE_SIZE sysconf(_SC_PAGE_SIZE)
+#endif
 #include <linux/binfmts.h>
 #include <xen/xen-compat.h>
 #if __XEN_LATEST_INTERFACE_VERSION__ < 0x00040200