helloworld: Windows DPDK sample application is compiled and built using eal and kvargs libraries in order to add windows support in the mainline repository.
PATCH 1/1 helloworld: Windows DPDK sample application is compiled and built using eal and kvargs libraries in order to add windows support in the mainline repository.
---
[RFC] This is a large patch that contains changes to build the HelloWorld sample application on Windows. It also contains changes to build the librte_eal and librte_kvargs libraries which are required to build the sample application. To merge these changes, this patch will be split up into multiple smaller patches and sent for review.
lib/librte_eal/common/eal_common_errno.c | 9 + lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/eal_common_options.c | 2 + lib/librte_eal/common/eal_common_timer.c | 2 + .../common/include/arch/x86/rte_byteorder.h | 14 + .../common/include/arch/x86/rte_rtm.h | 22 +- lib/librte_eal/common/include/rte_common.h | 11 + .../common/include/rte_malloc_heap.h | 3 + lib/librte_eal/common/include/rte_random.h | 4 + .../common/include/rte_string_fns.h | 2 + lib/librte_eal/common/malloc_elem.h | 3 + lib/librte_eal/common/malloc_heap.c | 2 + lib/librte_eal/common/malloc_heap.h | 4 + lib/librte_eal/windows/eal/eal.c | 697 +++++++++ lib/librte_eal/windows/eal/eal_alarm.c | 29 + lib/librte_eal/windows/eal/eal_debug.c | 102 ++ lib/librte_eal/windows/eal/eal_fbarray.c | 1273 +++++++++++++++++ lib/librte_eal/windows/eal/eal_filesystem.h | 97 ++ .../windows/eal/eal_hugepage_info.c | 20 + lib/librte_eal/windows/eal/eal_interrupts.c | 90 ++ lib/librte_eal/windows/eal/eal_lcore.c | 83 ++ lib/librte_eal/windows/eal/eal_log.c | 415 ++++++ lib/librte_eal/windows/eal/eal_memalloc.c | 995 +++++++++++++ lib/librte_eal/windows/eal/eal_memory.c | 140 ++ lib/librte_eal/windows/eal/eal_proc.c | 1003 +++++++++++++ lib/librte_eal/windows/eal/eal_thread.c | 167 +++ lib/librte_eal/windows/eal/eal_timer.c | 40 + .../windows/eal/linux-emu/_rand48.c | 46 + .../windows/eal/linux-emu/drand48.c | 62 + lib/librte_eal/windows/eal/linux-emu/fork.c | 111 ++ lib/librte_eal/windows/eal/linux-emu/getopt.c | 407 ++++++ .../windows/eal/linux-emu/lrand48.c | 23 + lib/librte_eal/windows/eal/linux-emu/mman.c | 179 +++ lib/librte_eal/windows/eal/linux-emu/setenv.c | 26 + .../windows/eal/linux-emu/srand48.c | 30 + .../windows/eal/linux-emu/termios.c | 11 + lib/librte_eal/windows/eal/linux-emu/unistd.c | 21 + lib/librte_eal/windows/eal/malloc_heap.c | 1068 ++++++++++++++ lib/librte_eal/windows/eal/malloc_mp.c | 645 +++++++++ .../windows/include_override/dirent.h | 950 ++++++++++++ .../windows/include_override/getopt.h | 252 ++++ .../windows/include_override/net/ethernet.h | 405 ++++++ .../windows/include_override/netinet/in.h | 48 + .../windows/include_override/netinet/tcp.h | 4 + .../windows/include_override/pthread.h | 65 + .../windows/include_override/rand48.h | 32 + .../windows/include_override/sched.h | 21 + .../windows/include_override/sys/_iovec.h | 48 + .../include_override/sys/_sockaddr_storage.h | 54 + .../windows/include_override/sys/_termios.h | 222 +++ .../windows/include_override/sys/_types.h | 105 ++ .../windows/include_override/sys/cdefs.h | 3 + .../windows/include_override/sys/mman.h | 63 + .../include_override/sys/netbsd/queue.h | 846 +++++++++++ .../windows/include_override/sys/queue.h | 11 + .../windows/include_override/syslog.h | 217 +++ .../windows/include_override/termios.h | 1 + .../windows/include_override/unistd.h | 30 + .../windows/include_override/x86intrin.h | 1 + .../rte_override/exec-env/rte_interrupts.h | 3 + lib/librte_eal/windows/rte_override/rte_acl.h | 7 + .../windows/rte_override/rte_atomic.h | 744 ++++++++++ .../windows/rte_override/rte_bus_pci.h | 25 + .../windows/rte_override/rte_byteorder.h | 10 + .../windows/rte_override/rte_common.h | 56 + .../windows/rte_override/rte_common.h.sav | 372 +++++ .../windows/rte_override/rte_config.h | 328 +++++ .../windows/rte_override/rte_cpuflags.h | 3 + .../windows/rte_override/rte_cycles.h | 26 + .../windows/rte_override/rte_debug.h | 22 + lib/librte_eal/windows/rte_override/rte_io.h | 8 + .../windows/rte_override/rte_lcore.h | 15 + .../windows/rte_override/rte_log.h.sav | 6 + .../windows/rte_override/rte_memcpy.h | 3 + .../windows/rte_override/rte_memory.h | 20 + .../windows/rte_override/rte_pause.h | 10 + lib/librte_eal/windows/rte_override/rte_pci.h | 7 + .../windows/rte_override/rte_per_lcore.h | 29 + .../windows/rte_override/rte_prefetch.h | 29 + lib/librte_eal/windows/rte_override/rte_rtm.h | 8 + .../windows/rte_override/rte_rwlock.h | 40 + .../windows/rte_override/rte_spinlock.h | 271 ++++ .../windows/rte_override/rte_vect.h | 5 + .../windows/rte_override/rte_wincompat.h | 347 +++++ .../windows/rte_override/rte_windows.h | 497 +++++++ mk/exec-env/windows/DpdkRteLib.props | 46 + mk/exec-env/windows/dpdk.sln | 43 + .../windows/helloworld/helloworld.vcxproj | 98 ++ .../helloworld/helloworld.vcxproj.filters | 22 + .../helloworld/helloworld.vcxproj.user | 4 + .../windows/librte_eal/librte_eal.vcxproj | 187 +++ .../librte_eal/librte_eal.vcxproj.filters | 297 ++++ .../librte_eal/librte_eal.vcxproj.user | 4 + .../librte_kvargs/librte_kvargs.vcxproj | 91 ++ .../librte_kvargs.vcxproj.filters | 33 + .../librte_kvargs/librte_kvargs.vcxproj.user | 4 + 96 files changed, 14955 insertions(+), 3 deletions(-) create mode 100644 lib/librte_eal/windows/eal/eal.c create mode 100644 lib/librte_eal/windows/eal/eal_alarm.c create mode 100644 lib/librte_eal/windows/eal/eal_debug.c create mode 100644 lib/librte_eal/windows/eal/eal_fbarray.c create mode 100644 lib/librte_eal/windows/eal/eal_filesystem.h create mode 100644 lib/librte_eal/windows/eal/eal_hugepage_info.c create mode 100644 lib/librte_eal/windows/eal/eal_interrupts.c create mode 100644 lib/librte_eal/windows/eal/eal_lcore.c create mode 100644 lib/librte_eal/windows/eal/eal_log.c create mode 100644 lib/librte_eal/windows/eal/eal_memalloc.c create mode 100644 lib/librte_eal/windows/eal/eal_memory.c create mode 100644 lib/librte_eal/windows/eal/eal_proc.c create mode 100644 lib/librte_eal/windows/eal/eal_thread.c create mode 100644 lib/librte_eal/windows/eal/eal_timer.c create mode 100644 lib/librte_eal/windows/eal/linux-emu/_rand48.c create mode 100644 lib/librte_eal/windows/eal/linux-emu/drand48.c create mode 100644 lib/librte_eal/windows/eal/linux-emu/fork.c create mode 100644 lib/librte_eal/windows/eal/linux-emu/getopt.c create mode 100644 lib/librte_eal/windows/eal/linux-emu/lrand48.c create mode 100644 lib/librte_eal/windows/eal/linux-emu/mman.c create mode 100644 lib/librte_eal/windows/eal/linux-emu/setenv.c create mode 100644 lib/librte_eal/windows/eal/linux-emu/srand48.c create mode 100644 lib/librte_eal/windows/eal/linux-emu/termios.c create mode 100644 lib/librte_eal/windows/eal/linux-emu/unistd.c create mode 100644 lib/librte_eal/windows/eal/malloc_heap.c create mode 100644 lib/librte_eal/windows/eal/malloc_mp.c create mode 100644 lib/librte_eal/windows/include_override/dirent.h create mode 100644 lib/librte_eal/windows/include_override/getopt.h create mode 100644 lib/librte_eal/windows/include_override/net/ethernet.h create mode 100644 lib/librte_eal/windows/include_override/netinet/in.h create mode 100644 lib/librte_eal/windows/include_override/netinet/tcp.h create mode 100644 lib/librte_eal/windows/include_override/pthread.h create mode 100644 lib/librte_eal/windows/include_override/rand48.h create mode 100644 lib/librte_eal/windows/include_override/sched.h create mode 100644 lib/librte_eal/windows/include_override/sys/_iovec.h create mode 100644 lib/librte_eal/windows/include_override/sys/_sockaddr_storage.h create mode 100644 lib/librte_eal/windows/include_override/sys/_termios.h create mode 100644 lib/librte_eal/windows/include_override/sys/_types.h create mode 100644 lib/librte_eal/windows/include_override/sys/cdefs.h create mode 100644 lib/librte_eal/windows/include_override/sys/mman.h create mode 100644 lib/librte_eal/windows/include_override/sys/netbsd/queue.h create mode 100644 lib/librte_eal/windows/include_override/sys/queue.h create mode 100644 lib/librte_eal/windows/include_override/syslog.h create mode 100644 lib/librte_eal/windows/include_override/termios.h create mode 100644 lib/librte_eal/windows/include_override/unistd.h create mode 100644 lib/librte_eal/windows/include_override/x86intrin.h create mode 100644 lib/librte_eal/windows/rte_override/exec-env/rte_interrupts.h create mode 100644 lib/librte_eal/windows/rte_override/rte_acl.h create mode 100644 lib/librte_eal/windows/rte_override/rte_atomic.h create mode 100644 lib/librte_eal/windows/rte_override/rte_bus_pci.h create mode 100644 lib/librte_eal/windows/rte_override/rte_byteorder.h create mode 100644 lib/librte_eal/windows/rte_override/rte_common.h create mode 100644 lib/librte_eal/windows/rte_override/rte_common.h.sav create mode 100644 lib/librte_eal/windows/rte_override/rte_config.h create mode 100644 lib/librte_eal/windows/rte_override/rte_cpuflags.h create mode 100644 lib/librte_eal/windows/rte_override/rte_cycles.h create mode 100644 lib/librte_eal/windows/rte_override/rte_debug.h create mode 100644 lib/librte_eal/windows/rte_override/rte_io.h create mode 100644 lib/librte_eal/windows/rte_override/rte_lcore.h create mode 100644 lib/librte_eal/windows/rte_override/rte_log.h.sav create mode 100644 lib/librte_eal/windows/rte_override/rte_memcpy.h create mode 100644 lib/librte_eal/windows/rte_override/rte_memory.h create mode 100644 lib/librte_eal/windows/rte_override/rte_pause.h create mode 100644 lib/librte_eal/windows/rte_override/rte_pci.h create mode 100644 lib/librte_eal/windows/rte_override/rte_per_lcore.h create mode 100644 lib/librte_eal/windows/rte_override/rte_prefetch.h create mode 100644 lib/librte_eal/windows/rte_override/rte_rtm.h create mode 100644 lib/librte_eal/windows/rte_override/rte_rwlock.h create mode 100644 lib/librte_eal/windows/rte_override/rte_spinlock.h create mode 100644 lib/librte_eal/windows/rte_override/rte_vect.h create mode 100644 lib/librte_eal/windows/rte_override/rte_wincompat.h create mode 100644 lib/librte_eal/windows/rte_override/rte_windows.h create mode 100644 mk/exec-env/windows/DpdkRteLib.props create mode 100644 mk/exec-env/windows/dpdk.sln create mode 100644 mk/exec-env/windows/helloworld/helloworld.vcxproj create mode 100644 mk/exec-env/windows/helloworld/helloworld.vcxproj.filters create mode 100644 mk/exec-env/windows/helloworld/helloworld.vcxproj.user create mode 100644 mk/exec-env/windows/librte_eal/librte_eal.vcxproj create mode 100644 mk/exec-env/windows/librte_eal/librte_eal.vcxproj.filters create mode 100644 mk/exec-env/windows/librte_eal/librte_eal.vcxproj.user create mode 100644 mk/exec-env/windows/librte_kvargs/librte_kvargs.vcxproj create mode 100644 mk/exec-env/windows/librte_kvargs/librte_kvargs.vcxproj.filters create mode 100644 mk/exec-env/windows/librte_kvargs/librte_kvargs.vcxproj.user
lib/librte_eal/common/eal_common_errno.c +9 -0
@@ -27,7 +27,12 @@ rte_strerror(int errnum)static const char *sep ="" ;#endif #define RETVAL_SZ 256 +#ifdef _WIN64 +typedef char c_retval [RETVAL_SZ ]; + RTE_DEFINE_PER_LCORE(static c_retval, retval); +#else static RTE_DEFINE_PER_LCORE(char[RETVAL_SZ], retval); +#endif char *ret =RTE_PER_LCORE (retval);/* since some implementations of strerror_r throw an error
@@ -41,9 +46,13 @@ rte_strerror(int errnum)case E_RTE_NO_CONFIG :return "Missing rte_config structure" ;default : +#ifdef _WIN64 +strerror_s (RTE_PER_LCORE (retval),RETVAL_SZ , errnum); +#else if (strerror_r (errnum, ret,RETVAL_SZ ) !=0 )snprintf (ret,RETVAL_SZ ,"Unknown error%s %d" , sep, errnum); +#endif }return ret;
lib/librte_eal/common/eal_common_log.c +2 -0
@@ -28,8 +28,10 @@ struct rte_eal_opt_loglevel {/** Next list entry */ TAILQ_ENTRY (rte_eal_opt_loglevel) next;/** Compiled regular expression obtained from the option */ +#ifndef _WIN64regex_t re_match;/** Glob match string option */ +#endif // !_WIN64 char *pattern;/** Log level value obtained from the option */ uint32_t level;
lib/librte_eal/common/eal_common_options.c +2 -0
@@ -11,7 +11,9 @@#include <limits.h> #include <errno.h> #include <getopt.h> +#ifndef _WIN64#include <dlfcn.h> +#endif #include <sys/types.h> #include <sys/stat.h> #include <dirent.h>
lib/librte_eal/common/eal_common_timer.c +2 -0
@@ -33,6 +33,7 @@ rte_delay_us_block(unsigned int us)rte_pause (); } +#ifndef _WIN64 void __rte_experimentalrte_delay_us_sleep (unsigned int us) {
@@ -54,6 +55,7 @@ rte_delay_us_sleep(unsigned int us) ind = 1 - ind; } } +#endif uint64_t rte_get_tsc_hz (void )
lib/librte_eal/common/include/arch/x86/rte_byteorder.h +14 -0
@@ -26,10 +26,16 @@ extern "C" {static inline uint16_t rte_arch_bswap16 (uint16_t _x) {uint16_t x = _x; +#ifndef _WIN64 asmvolatile ("xchgb %b[x1],%h[x2]" : [x1]"=Q" (x) : [x2]"0" (x) ); +#else + __asm { +/* Add appropriate __asm here */ + } +#endif return x; }
@@ -41,9 +47,17 @@ static inline uint16_t rte_arch_bswap16(uint16_t _x)static inline uint32_t rte_arch_bswap32 (uint32_t _x) {uint32_t x = _x; +#ifndef _WIN64 asmvolatile ("bswap %[x]" : [x]"+r" (x) ); +#else + __asm { + mov eax, x + bswap eax + mov x, eax + } +#endif return x; }
lib/librte_eal/common/include/arch/x86/rte_rtm.h +19 -3
@@ -29,29 +29,45 @@ static __attribute__((__always_inline__)) inlineunsigned int rte_xbegin (void ) {unsigned int ret =RTE_XBEGIN_STARTED ; - +#ifndef _WIN64 asmvolatile (".byte 0xc7,0xf8 ; .long 0" :"+a" (ret) ::"memory" ); +#else +/* Add appropriate asm here for Windows compilers */ +#endif return ret; }static __attribute__((__always_inline__))inline void rte_xend (void ) { - asmvolatile (".byte 0x0f,0x01,0xd5" :::"memory" ); +#ifndef _WIN64 + asmvolatile (".byte 0x0f,0x01,0xd5" :::"memory" ); +#else +/* Add appropriate asm here for Windows compilers */ +#endif }/* not an inline function to workaround a clang bug with -O0 */ +#ifndef _WIN64#define rte_xabort (status) do { \ asm volatile(".byte 0xc6,0xf8,%P0" :: "i" (status) : "memory"); \ } while (0) +#else +#define rte_xabort(status) do { \ + /* Add appropriate asm here for Windows compilers */ \ +} while (0) +#endif static __attribute__((__always_inline__))inline int rte_xtest (void ) {unsigned char out; - +#ifndef _WIN64 asmvolatile (".byte 0x0f,0x01,0xd6 ; setnz %0" :"=r" (out) ::"memory" ); +#else +/* Add appropriate asm here for Windows compilers */ +#endif return out; }
lib/librte_eal/common/include/rte_common.h +11 -0
@@ -103,8 +103,15 @@ typedef uint16_t unaligned_uint16_t;* Priority number must be above 100. * Lowest number is the first to run. */ +#ifndef _WIN64#define RTE_INIT_PRIO (func, prio) \ static void __attribute__((constructor(RTE_PRIO(prio)), used)) func(void) +#else +/* Re-define this without the __attribute__ and static declarator */ +#define RTE_INIT_PRIO (func, prio) \ +void func(void) +#endif +/** * Run function before main() with low priority.
@@ -262,7 +269,11 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)static inline int rte_is_aligned (void *ptr,unsigned align) { +#ifndef _WIN64return RTE_PTR_ALIGN (ptr, align) == ptr; +#else +return (((uintptr_t )ptr % align) ==0 ); +#endif }/*********** Macros for compile type checks ********/
lib/librte_eal/common/include/rte_malloc_heap.h +3 -0
@@ -20,6 +20,9 @@ struct malloc_elem;/** * Structure to hold malloc heap */ +#ifdef _WIN64 +RTE_CACHE_ALIGN +#endif struct malloc_heap {rte_spinlock_t lock; LIST_HEAD(, malloc_elem) free_head[RTE_HEAP_NUM_FREELISTS];
lib/librte_eal/common/include/rte_random.h +4 -0
@@ -18,6 +18,10 @@ extern "C" {#include <stdint.h> #include <stdlib.h> +#ifdef _WIN64 +#include "rand48.h" +#endif +/** * Seed the pseudo-random generator. *
lib/librte_eal/common/include/rte_string_fns.h +2 -0
@@ -66,6 +66,7 @@ rte_strlcpy(char *dst, const char *src, size_t size)#endif #else /* non-BSD platforms */ +#ifndef _WIN64#ifdef RTE_USE_LIBBSD #include <bsd/string.h>
@@ -73,6 +74,7 @@ rte_strlcpy(char *dst, const char *src, size_t size)#define strlcpy (dst, src, size) rte_strlcpy(dst, src, size)#endif /* RTE_USE_LIBBSD */ +#endif /* WIN64 */ #endif /* BSDAPP */ /**
lib/librte_eal/common/malloc_elem.h +3 -0
@@ -20,6 +20,9 @@ enum elem_state {ELEM_PAD /* element is a padding-only header */ }; +#ifdef _WIN64 +RTE_CACHE_ALIGN +#endif struct malloc_elem {struct malloc_heap *heap;struct malloc_elem *volatile prev;
lib/librte_eal/common/malloc_heap.c +2 -0
@@ -60,11 +60,13 @@ check_hugepage_sz(unsigned flags, uint64_t hugepage_sz)case RTE_PGSIZE_1G : check_flag =RTE_MEMZONE_1GB ;break ; +#ifndef _WIN64case RTE_PGSIZE_4G : check_flag =RTE_MEMZONE_4GB ;break ;case RTE_PGSIZE_16G : check_flag =RTE_MEMZONE_16GB ; +#endif }return check_flag & flags;
lib/librte_eal/common/malloc_heap.h +4 -0
@@ -10,6 +10,10 @@#include <rte_malloc.h> #include <rte_malloc_heap.h> +#ifdef _WIN64 +#include <rte_lcore.h> +#endif +#ifdef __cplusplusextern "C" {#endif
lib/librte_eal/windows/eal/eal.c new file +697 -0
697 lines not on this page · raw message
lib/librte_eal/windows/eal/eal_alarm.c new file +29 -0
@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2017-2018 Intel Corporation +*/ + +#include <rte_alarm.h> +#include <rte_common.h> +#include "eal_private.h" + +int +rte_eal_alarm_init (void ) +{ +return 0 ; +} + + +int +rte_eal_alarm_set(uint64_t us __rte_unused, + rte_eal_alarm_callback cb_fn __rte_unused, + void *cb_arg __rte_unused) +{ +return -ENOTSUP ; +} + +int +rte_eal_alarm_cancel(rte_eal_alarm_callback cb_fn __rte_unused, + void *cb_arg __rte_unused) +{ +return -ENOTSUP ; +}
lib/librte_eal/windows/eal/eal_debug.c new file +102 -0
102 lines not on this page · raw message
lib/librte_eal/windows/eal/eal_fbarray.c new file +1273 -0
1,273 lines not on this page · raw message
lib/librte_eal/windows/eal/eal_filesystem.h new file +97 -0
97 lines not on this page · raw message
lib/librte_eal/windows/eal/eal_hugepage_info.c new file +20 -0
@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2017-2018 Intel Corporation +*/ + +#include <rte_log.h> +#include "eal_internal_cfg.h" +#include "eal_hugepages.h" + + +/* +* Need to complete hugepage support on Windows +*/ +int +eal_hugepage_info_init (void ) +{ + internal_config.num_hugepage_sizes =1 ; + internal_config.hugepage_info[0 ].hugepage_sz = (uint64_t )GetLargePageMinimum (); + +return 0 ; +}
lib/librte_eal/windows/eal/eal_interrupts.c new file +90 -0
90 lines not on this page · raw message
lib/librte_eal/windows/eal/eal_lcore.c new file +83 -0
83 lines not on this page · raw message
lib/librte_eal/windows/eal/eal_log.c new file +415 -0
379 lines not on this page · raw message
lib/librte_eal/windows/eal/eal_memalloc.c new file +995 -0
995 lines not on this page · raw message
lib/librte_eal/windows/eal/eal_memory.c new file +140 -0
140 lines not on this page · raw message
lib/librte_eal/windows/eal/eal_proc.c new file +1003 -0
1,003 lines not on this page · raw message
lib/librte_eal/windows/eal/eal_thread.c new file +167 -0
167 lines not on this page · raw message
lib/librte_eal/windows/eal/eal_timer.c new file +40 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/eal/linux-emu/_rand48.c new file +46 -0
46 lines not on this page · raw message
lib/librte_eal/windows/eal/linux-emu/drand48.c new file +62 -0
62 lines not on this page · raw message
lib/librte_eal/windows/eal/linux-emu/fork.c new file +111 -0
111 lines not on this page · raw message
lib/librte_eal/windows/eal/linux-emu/getopt.c new file +407 -0
407 lines not on this page · raw message
lib/librte_eal/windows/eal/linux-emu/lrand48.c new file +23 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/eal/linux-emu/mman.c new file +179 -0
179 lines not on this page · raw message
lib/librte_eal/windows/eal/linux-emu/setenv.c new file +26 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/eal/linux-emu/srand48.c new file +30 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/eal/linux-emu/termios.c new file +11 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/eal/linux-emu/unistd.c new file +21 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/eal/malloc_heap.c new file +1068 -0
1,068 lines not on this page · raw message
lib/librte_eal/windows/eal/malloc_mp.c new file +645 -0
645 lines not on this page · raw message
lib/librte_eal/windows/include_override/dirent.h new file +950 -0
950 lines not on this page · raw message
lib/librte_eal/windows/include_override/getopt.h new file +252 -0
252 lines not on this page · raw message
lib/librte_eal/windows/include_override/net/ethernet.h new file +405 -0
405 lines not on this page · raw message
lib/librte_eal/windows/include_override/netinet/in.h new file +48 -0
48 lines not on this page · raw message
lib/librte_eal/windows/include_override/netinet/tcp.h new file +4 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/include_override/pthread.h new file +65 -0
65 lines not on this page · raw message
lib/librte_eal/windows/include_override/rand48.h new file +32 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/include_override/sched.h new file +21 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/include_override/sys/_iovec.h new file +48 -0
48 lines not on this page · raw message
lib/librte_eal/windows/include_override/sys/_sockaddr_storage.h new file +54 -0
54 lines not on this page · raw message
lib/librte_eal/windows/include_override/sys/_termios.h new file +222 -0
222 lines not on this page · raw message
lib/librte_eal/windows/include_override/sys/_types.h new file +105 -0
105 lines not on this page · raw message
lib/librte_eal/windows/include_override/sys/cdefs.h new file +3 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/include_override/sys/mman.h new file +63 -0
63 lines not on this page · raw message
lib/librte_eal/windows/include_override/sys/netbsd/queue.h new file +846 -0
846 lines not on this page · raw message
lib/librte_eal/windows/include_override/sys/queue.h new file +11 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/include_override/syslog.h new file +217 -0
217 lines not on this page · raw message
lib/librte_eal/windows/include_override/termios.h new file +1 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/include_override/unistd.h new file +30 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/include_override/x86intrin.h new file +1 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/exec-env/rte_interrupts.h new file +3 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_acl.h new file +7 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_atomic.h new file +744 -0
744 lines not on this page · raw message
lib/librte_eal/windows/rte_override/rte_bus_pci.h new file +25 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_byteorder.h new file +10 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_common.h new file +56 -0
56 lines not on this page · raw message
lib/librte_eal/windows/rte_override/rte_common.h.sav new file +372 -0
372 lines not on this page · raw message
lib/librte_eal/windows/rte_override/rte_config.h new file +328 -0
328 lines not on this page · raw message
lib/librte_eal/windows/rte_override/rte_cpuflags.h new file +3 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_cycles.h new file +26 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_debug.h new file +22 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_io.h new file +8 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_lcore.h new file +15 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_log.h.sav new file +6 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_memcpy.h new file +3 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_memory.h new file +20 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_pause.h new file +10 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_pci.h new file +7 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_per_lcore.h new file +29 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_prefetch.h new file +29 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_rtm.h new file +8 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_rwlock.h new file +40 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_spinlock.h new file +271 -0
271 lines not on this page · raw message
lib/librte_eal/windows/rte_override/rte_vect.h new file +5 -0
Lines of this file are not shown. View the raw message.
lib/librte_eal/windows/rte_override/rte_wincompat.h new file +347 -0
347 lines not on this page · raw message
lib/librte_eal/windows/rte_override/rte_windows.h new file +497 -0
497 lines not on this page · raw message
mk/exec-env/windows/DpdkRteLib.props new file +27 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
_vhost;$(RTE_SDK)\lib\librte_compat;$(RTE_SDK)\drivers\bus\pci;$(RTE_SDK)\lib\librte_security;$(RTE_SDK)\lib\librte_bitratestats;$(RTE_SDK)\lib\librte_metrics;$(RTE_SDK)\lib\librte_efd;$(RTE_SDK)\li b\librte_cryptodev;$(RTE_SDK)\lib\librte_flow_classify</AdditionalIncludeDirectories>
+ <ForcedIncludeFiles>$(RTE_SDK)\lib\librte_eal\windows\rte_override\rte_windows.h</ForcedIncludeFiles> + <CLanguageStandard>gnu11</CLanguageStandard> + <PrecompiledHeaderCompileAs> + </PrecompiledHeaderCompileAs> + <PrecompiledHeaderOutputFileDirectory /> + <CompileAs>Default</CompileAs> + <C99Support> + </C99Support> + <StructMemberAlignment>1Byte</StructMemberAlignment> + <AdditionalOptions>/Qstd=c11 %(AdditionalOptions)</AdditionalOptions> + <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <BuildMacro Include="RTE_SDK">
+ <Value>$(RTE_SDK)</Value>
+ </BuildMacro>
+ </ItemGroup>
+</Project>
\ No newline at end of file
mk/exec-env/windows/dpdk.sln new file +43 -0
43 lines not on this page · raw message
mk/exec-env/windows/helloworld/helloworld.vcxproj new file +98 -0
98 lines not on this page · raw message
mk/exec-env/windows/helloworld/helloworld.vcxproj.filters new file +22 -0
Lines of this file are not shown. View the raw message.
mk/exec-env/windows/helloworld/helloworld.vcxproj.user new file +4 -0
Lines of this file are not shown. View the raw message.
mk/exec-env/windows/librte_eal/librte_eal.vcxproj new file +187 -0
187 lines not on this page · raw message
mk/exec-env/windows/librte_eal/librte_eal.vcxproj.filters new file +297 -0
297 lines not on this page · raw message
mk/exec-env/windows/librte_eal/librte_eal.vcxproj.user new file +4 -0
Lines of this file are not shown. View the raw message.
mk/exec-env/windows/librte_kvargs/librte_kvargs.vcxproj new file +91 -0
91 lines not on this page · raw message
mk/exec-env/windows/librte_kvargs/librte_kvargs.vcxproj.filters new file +33 -0
Lines of this file are not shown. View the raw message.
mk/exec-env/windows/librte_kvargs/librte_kvargs.vcxproj.user new file +4 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.18.0.windows.1
Part of the diff is not shown here. View the raw message.
lib/librte_eal/windows/rte_override/rte_windows.h line 24
Quoted 2 lines · On Wed, 28 Nov 2018 21:05:04 -0800 Pallavi Kadam <[email protected]>…
lib/librte_eal/windows/rte_override/rte_windows.h new file +2
-0+// If we define WIN32_LEAN_AND_MEAN, winsock isn't included by default. We can then include it in specific header files as we need later. +#define WIN32_LEAN_AND_MEAN
All this is Windows code, it would be best if the code style of the new code matches the rest of the DPDK. The DPDK follows subset of Linux kernel style standard. In that standard C++ style comments are not used.
Quoted 108 lines · Pallavi Kadam
Signed-off-by Pallavi Kadam <[email protected]>---
[RFC] This is a large patch that contains changes to build the HelloWorld
sample application on Windows. It also contains changes to build thelibrte_ealandlibrte_kvargslibraries which are required to build the
sample application. To merge these changes, this patch will be split up
into multiple smaller patches and sent for review.lib/librte_eal/common/eal_common_errno.c | 9 + lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/eal_common_options.c | 2 + lib/librte_eal/common/eal_common_timer.c | 2 + .../common/include/arch/x86/rte_byteorder.h | 14 + .../common/include/arch/x86/rte_rtm.h | 22 +- lib/librte_eal/common/include/rte_common.h | 11 + .../common/include/rte_malloc_heap.h | 3 + lib/librte_eal/common/include/rte_random.h | 4 +
.../common/include/rte_string_fns.h | 2 + lib/librte_eal/common/malloc_elem.h | 3 + lib/librte_eal/common/malloc_heap.c | 2 + lib/librte_eal/common/malloc_heap.h | 4 +lib/librte_eal/windows/eal/eal.c | 697 +++++++++ lib/librte_eal/windows/eal/eal_alarm.c | 29 + lib/librte_eal/windows/eal/eal_debug.c | 102 ++ lib/librte_eal/windows/eal/eal_fbarray.c | 1273
+++++++++++++++++
lib/librte_eal/windows/eal/eal_filesystem.h | 97 ++ .../windows/eal/eal_hugepage_info.c | 20 + lib/librte_eal/windows/eal/eal_interrupts.c | 90 ++ lib/librte_eal/windows/eal/eal_lcore.c | 83 ++ lib/librte_eal/windows/eal/eal_log.c | 415 ++++++ lib/librte_eal/windows/eal/eal_memalloc.c | 995 +++++++++++++ lib/librte_eal/windows/eal/eal_memory.c | 140 ++ lib/librte_eal/windows/eal/eal_proc.c | 1003 +++++++++++++ lib/librte_eal/windows/eal/eal_thread.c | 167 +++ lib/librte_eal/windows/eal/eal_timer.c | 40 + .../windows/eal/linux-emu/_rand48.c | 46 + .../windows/eal/linux-emu/drand48.c | 62 + lib/librte_eal/windows/eal/linux-emu/fork.c | 111 ++lib/librte_eal/windows/eal/linux-emu/getopt.c| 407 ++++++ .../windows/eal/linux-emu/lrand48.c | 23 + lib/librte_eal/windows/eal/linux-emu/mman.c | 179 +++lib/librte_eal/windows/eal/linux-emu/setenv.c| 26 + .../windows/eal/linux-emu/srand48.c | 30 + .../windows/eal/linux-emu/termios.c | 11 +lib/librte_eal/windows/eal/linux-emu/unistd.c| 21 + lib/librte_eal/windows/eal/malloc_heap.c | 1068 ++++++++++++++ lib/librte_eal/windows/eal/malloc_mp.c | 645 +++++++++ .../windows/include_override/dirent.h | 950 ++++++++++++ .../windows/include_override/getopt.h | 252 ++++ .../windows/include_override/net/ethernet.h | 405 ++++++ .../windows/include_override/netinet/in.h | 48 + .../windows/include_override/netinet/tcp.h | 4 + .../windows/include_override/pthread.h | 65 + .../windows/include_override/rand48.h | 32 + .../windows/include_override/sched.h | 21 + .../windows/include_override/sys/_iovec.h | 48 + .../include_override/sys/_sockaddr_storage.h | 54 + .../windows/include_override/sys/_termios.h | 222 +++ .../windows/include_override/sys/_types.h | 105 ++ .../windows/include_override/sys/cdefs.h | 3 + .../windows/include_override/sys/mman.h | 63 + .../include_override/sys/netbsd/queue.h | 846 +++++++++++ .../windows/include_override/sys/queue.h | 11 + .../windows/include_override/syslog.h | 217 +++ .../windows/include_override/termios.h | 1 + .../windows/include_override/unistd.h | 30 + .../windows/include_override/x86intrin.h | 1 + .../rte_override/exec-env/rte_interrupts.h | 3 +lib/librte_eal/windows/rte_override/rte_acl.h| 7 + .../windows/rte_override/rte_atomic.h | 744 ++++++++++ .../windows/rte_override/rte_bus_pci.h | 25 + .../windows/rte_override/rte_byteorder.h | 10 + .../windows/rte_override/rte_common.h | 56 + .../windows/rte_override/rte_common.h.sav | 372 +++++ .../windows/rte_override/rte_config.h | 328 +++++ .../windows/rte_override/rte_cpuflags.h | 3 + .../windows/rte_override/rte_cycles.h | 26 + .../windows/rte_override/rte_debug.h | 22 + lib/librte_eal/windows/rte_override/rte_io.h | 8 + .../windows/rte_override/rte_lcore.h | 15 + .../windows/rte_override/rte_log.h.sav | 6 + .../windows/rte_override/rte_memcpy.h | 3 + .../windows/rte_override/rte_memory.h | 20 + .../windows/rte_override/rte_pause.h | 10 +lib/librte_eal/windows/rte_override/rte_pci.h| 7 + .../windows/rte_override/rte_per_lcore.h | 29 + .../windows/rte_override/rte_prefetch.h | 29 +lib/librte_eal/windows/rte_override/rte_rtm.h| 8 + .../windows/rte_override/rte_rwlock.h | 40 + .../windows/rte_override/rte_spinlock.h | 271 ++++ .../windows/rte_override/rte_vect.h | 5 + .../windows/rte_override/rte_wincompat.h | 347 +++++ .../windows/rte_override/rte_windows.h | 497 +++++++ mk/exec-env/windows/DpdkRteLib.props | 46 + mk/exec-env/windows/dpdk.sln | 43 + .../windows/helloworld/helloworld.vcxproj | 98 ++ .../helloworld/helloworld.vcxproj.filters | 22 + .../helloworld/helloworld.vcxproj.user | 4 + .../windows/librte_eal/librte_eal.vcxproj | 187 +++ .../librte_eal/librte_eal.vcxproj.filters | 297 ++++ .../librte_eal/librte_eal.vcxproj.user | 4 + .../librte_kvargs/librte_kvargs.vcxproj | 91 ++ .../librte_kvargs.vcxproj.filters | 33 + .../librte_kvargs/librte_kvargs.vcxproj.user | 4 +
Quoted 1 line
96 files changed, 14955 insertions(+), 3 deletions(-)
Hi,
In my (limited) experience managing cross-platform projects, having manually defined Visual Studio files (*.vcxproj.*) manually checked in git and maintained is always a pain. They invariably get out of sync and rot, and they are massive and not very readable.
Given that we have now reasonably on-par support for Meson, which has both a Visual Studio backend and a Ninja (which IIRC is supported by VS) backend, wouldn't it be better to let the build be handled by Meson itself? There might be a couple of places that needs fixing (we don't always to the right thing of using join_path for directories for example) but in the long run it would be much more maintainable IMHO. Adding new libraries/PMDs would need to be done just once, etc etc.
Signature · 2 lines
Kind regards, Luca Boccassi