HelloWorld example for Windows
Subsystems (2)
cover HelloWorld example for Windows
Helloworld example for Windows.
Includes Windows-specific EAL changes and meson
changes to build the code on Windows.
Anand Rawat (6):
eal: eal stub to add windows support
eal: Add header files to support windows
eal: Add headers for compatibility with windows environment
eal: add minimum viable code for eal on windows
examples: Add meson changes for windows
doc: add documention for windows
config/meson.build | 28 +- config/rte_config.h | 15 +- config/x86/meson.build | 14 +- doc/guides/index.rst | 1 + doc/guides/windows_gsg/build_dpdk.rst | 76 +++++ doc/guides/windows_gsg/index.rst | 14 + doc/guides/windows_gsg/intro.rst | 20 ++ examples/meson.build | 9 +- .../common/include/arch/x86/meson.build | 48 +-- .../include/arch/x86/winapp/rte_atomic.h | 19 ++ .../include/arch/x86/winapp/rte_pause.h | 22 ++ lib/librte_eal/common/meson.build | 161 +++++---- lib/librte_eal/meson.build | 10 +- lib/librte_eal/winapp/eal/eal.c | 79 +++++ lib/librte_eal/winapp/eal/eal_debug.c | 18 + lib/librte_eal/winapp/eal/eal_lcore.c | 90 +++++ lib/librte_eal/winapp/eal/eal_thread.c | 152 +++++++++ .../winapp/eal/include/exec-env/fnmatch.h | 26 ++ .../winapp/eal/include/exec-env/pthread.h | 19 ++ .../winapp/eal/include/exec-env/regex.h | 56 +++ .../winapp/eal/include/exec-env/rte_windows.h | 44 +++ .../winapp/eal/include/exec-env/sched.h | 41 +++ .../winapp/eal/include/exec-env/sys/queue.h | 320 ++++++++++++++++++ .../winapp/eal/include/exec-env/unistd.h | 7 + lib/librte_eal/winapp/eal/meson.build | 13 + lib/meson.build | 6 +- meson.build | 34 +- 27 files changed, 1212 insertions(+), 130 deletions(-) create mode 100644 doc/guides/windows_gsg/build_dpdk.rst create mode 100644 doc/guides/windows_gsg/index.rst create mode 100644 doc/guides/windows_gsg/intro.rst create mode 100644 lib/librte_eal/common/include/arch/x86/winapp/rte_atomic.h create mode 100644 lib/librte_eal/common/include/arch/x86/winapp/rte_pause.h create mode 100644 lib/librte_eal/winapp/eal/eal.c create mode 100644 lib/librte_eal/winapp/eal/eal_debug.c create mode 100644 lib/librte_eal/winapp/eal/eal_lcore.c create mode 100644 lib/librte_eal/winapp/eal/eal_thread.c create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/fnmatch.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/pthread.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/regex.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/rte_windows.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/sched.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/sys/queue.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/unistd.h create mode 100644 lib/librte_eal/winapp/eal/meson.build
Signature · 1 line
2.17.1.windows.2
PATCH 1/6 eal: eal stub to add windows support
Added initial stub source files for windows support and meson changes to build them.
--- config/meson.build | 28 +-- config/x86/meson.build | 14 +- .../common/include/arch/x86/meson.build | 41 +++-- lib/librte_eal/common/meson.build | 162 +++++++++--------- lib/librte_eal/meson.build | 10 +- lib/librte_eal/winapp/eal/eal.c | 11 ++ lib/librte_eal/winapp/eal/eal_debug.c | 11 ++ lib/librte_eal/winapp/eal/eal_lcore.c | 26 +++ lib/librte_eal/winapp/eal/eal_thread.c | 15 ++ lib/librte_eal/winapp/eal/meson.build | 10 ++ lib/meson.build | 6 +- meson.build | 34 ++-- 12 files changed, 239 insertions(+), 129 deletions(-) create mode 100644 lib/librte_eal/winapp/eal/eal.c create mode 100644 lib/librte_eal/winapp/eal/eal_debug.c create mode 100644 lib/librte_eal/winapp/eal/eal_lcore.c create mode 100644 lib/librte_eal/winapp/eal/eal_thread.c create mode 100644 lib/librte_eal/winapp/eal/meson.build
config/meson.build +18 -10
@@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2019 Intel Corporation # set the machine type and cflags for it if meson.is_cross_build()
@@ -48,22 +48,30 @@ dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8) add_project_link_arguments('-Wl,--no-as-needed', language: 'c') dpdk_extra_ldflags += '-Wl,--no-as-needed' -# use pthreads -add_project_link_arguments('-pthread', language: 'c') -dpdk_extra_ldflags += '-pthread' +if host_machine.system() != 'windows' + # use pthreads + add_project_link_arguments('-pthread', language: 'c') + dpdk_extra_ldflags += '-pthread' -# some libs depend on maths lib -add_project_link_arguments('-lm', language: 'c') -dpdk_extra_ldflags += '-lm' + # some libs depend on maths lib + add_project_link_arguments('-lm', language: 'c') + dpdk_extra_ldflags += '-lm' +endif # for linux link against dl, for bsd execinfo if host_machine.system() == 'linux' link_lib = 'dl' -else +elif host_machine.system() == 'freebsd' link_lib = 'execinfo' +else + link_lib = '' +endif + +# if link_lib is empty, do not add it to project properties +if link_lib != '' + add_project_link_arguments('-l' + link_lib, language: 'c') + dpdk_extra_ldflags += '-l' + link_lib endif -add_project_link_arguments('-l' + link_lib, language: 'c') -dpdk_extra_ldflags += '-l' + link_lib # check for libraries used in multiple places in DPDK has_libnuma = 0
config/x86/meson.build +8 -6
@@ -1,15 +1,17 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2019 Intel Corporation # for checking defines we need to use the correct compiler flags march_opt = ['-march=@0@'.format(machine)] # get binutils version for the workaround of Bug 97 -ldver = run_command('ld', '-v').stdout().strip() -if ldver.contains('2.30') - if cc.has_argument('-mno-avx512f') - march_opt += '-mno-avx512f' - message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97') +if host_machine.system() != 'windows' + ldver = run_command('ld', '-v').stdout().strip() + if ldver.contains('2.30') + if cc.has_argument('-mno-avx512f') + march_opt += '-mno-avx512f' + message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97') + endif endif endif
lib/librte_eal/common/include/arch/x86/meson.build +22 -19
43 lines not on this page · raw message
lib/librte_eal/common/meson.build +85 -77
176 lines not on this page · raw message
lib/librte_eal/meson.build +8 -2
@@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2019 Intel Corporation # Custom EAL processing. EAL is complicated enough that it can't just # have a straight list of headers and source files.
@@ -17,13 +17,19 @@ elif host_machine.system() == 'freebsd' dpdk_conf.set('RTE_EXEC_ENV_BSDAPP', 1) subdir('bsdapp/eal') +elif host_machine.system() == 'windows' + dpdk_conf.set('RTE_EXEC_ENV_WINDOWS', 1) + subdir('winapp/eal') + else error('unsupported system type "@0@"'.format(host_machine.system())) endif version = 9 # the version of the EAL API allow_experimental_apis = true -deps += 'kvargs' +if host_machine.system() != 'windows' + deps += 'kvargs' +endif if dpdk_conf.has('RTE_USE_LIBBSD') ext_deps += libbsd endif
lib/librte_eal/winapp/eal/eal.c new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2019 Intel Corporation +*/ + +#include "rte_common.h" + +int +rte_eal_init(int argc __rte_unused, char **argv __rte_unused) +{ +return 0 ; +}
lib/librte_eal/winapp/eal/eal_debug.c new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2019 Intel Corporation +*/ + +#include "rte_common.h" + +void +__rte_panic(const char *funcname __rte_unused, + const char *format __rte_unused, ...) +{ +}
lib/librte_eal/winapp/eal/eal_lcore.c new file +26 -0
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2019 Intel Corporation +*/ + +#include "rte_common.h" + +/* Get the cpu core id value */ +unsigned +eal_cpu_core_id (unsigned lcore_id) +{ +return lcore_id; +} + +/* Check if a cpu is present by the presence of the cpu information for it */ +int +eal_cpu_detected (unsigned lcore_id __rte_unused) +{ +return 1 ; +} + +/* Get CPU socket id (NUMA node) for a logical core */ +unsigned +eal_cpu_socket_id (unsigned cpu_id __rte_unused) +{ +return 0 ; +}
lib/librte_eal/winapp/eal/eal_thread.c new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2018 Intel Corporation +*/ + +#include <windows.h> + +#include "rte_common.h" + +typedef uintptr_t eal_thread_t ; + +int +eal_thread_create(eal_thread_t *thread __rte_unused) +{ +return 0 ; +}
lib/librte_eal/winapp/eal/meson.build new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation + +env_objs = [] +env_headers = [] +env_sources = files('eal.c', + 'eal_debug.c', + 'eal_lcore.c', + 'eal_thread.c', +)
lib/meson.build +5 -1
@@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2019 Intel Corporation # process all libraries equally, as far as possible
@@ -30,6 +30,10 @@ libraries = [ # flow_classify lib depends on pkt framework table lib 'flow_classify', 'bpf', 'telemetry'] +if host_machine.system() == 'windows' + libraries = ['eal'] # override libraries for windows +endif + default_cflags = machine_args if cc.has_argument('-Wno-format-truncation') default_cflags += '-Wno-format-truncation'
meson.build +20 -14
@@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2019 Intel Corporation project('DPDK', 'C', version: '19.05.0-rc0',
@@ -16,6 +16,7 @@ dpdk_static_libraries = [] dpdk_drivers = [] dpdk_extra_ldflags = [] dpdk_app_link_libraries = [] +driver_classes = [] # set the major version, which might be used by drivers and libraries # depending on the configuration options
@@ -35,28 +36,33 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) global_inc = include_directories('.', 'config', 'lib/librte_eal/common/include') subdir('config') -# build libs and drivers +# build libs subdir('lib') -subdir('buildtools') -subdir('drivers') -# build binaries and installable tools -subdir('usertools') -subdir('app') +if host_machine.system() != 'windows' + # build buildtools and drivers + subdir('buildtools') + subdir('drivers') -# build docs -subdir('doc') + # build binaries and installable tools + subdir('usertools') + subdir('app') + subdir('test') + + # build kernel modules if enabled + if get_option('enable_kmods') + subdir('kernel') + endif + + # build docs + subdir('doc') +endif # build any examples explicitly requested - useful for developers if get_option('examples') != '' subdir('examples') endif -# build kernel modules if enabled -if get_option('enable_kmods') - subdir('kernel') -endif - # write the build config build_cfg = 'rte_build_config.h' configure_file(output: build_cfg,
Signature · 1 line
2.17.1.windows.2
PATCH 2/6 eal: Add header files to support windows
In reply to Anand RawatAdded header files to support windows on x86 platforms. Updated rte_config to include rte_windows.h for windows build.
--- config/rte_config.h | 15 +++++++++++- .../common/include/arch/x86/meson.build | 7 ++++++ .../include/arch/x86/winapp/rte_atomic.h | 19 +++++++++++++++ .../include/arch/x86/winapp/rte_pause.h | 22 ++++++++++++++++++ .../winapp/eal/include/exec-env/rte_windows.h | 23 +++++++++++++++++++ lib/librte_eal/winapp/eal/meson.build | 5 +++- 6 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 lib/librte_eal/common/include/arch/x86/winapp/rte_atomic.h create mode 100644 lib/librte_eal/common/include/arch/x86/winapp/rte_pause.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/rte_windows.h
config/rte_config.h +14 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2017 Intel Corporation +* Copyright(c) 2019 Intel Corporation */ /**
@@ -20,6 +20,10 @@/****** library defines ********/ +#ifdef __cplusplus +extern "C" { +#endif +/* compat defines */ #define RTE_BUILD_SHARED_LIB
@@ -118,4 +122,13 @@/* QEDE PMD defines */ #define RTE_LIBRTE_QEDE_FW "" +/* windows specific*/ +#ifdef RTE_EXEC_ENV_WINDOWS +#include <rte_windows.h> +#endif + +#ifdef __cplusplus +} +#endif +#endif /* _RTE_CONFIG_H_ */
lib/librte_eal/common/include/arch/x86/meson.build +7 -0
@@ -21,4 +21,11 @@ if host_machine.system() != 'windows' 'rte_vect.h', subdir: get_option('include_subdir_arch') ) +else + # get and install the architecture specific windows headers + windows_headers = files( + 'winapp/rte_atomic.h', + 'winapp/rte_pause.h' + ) + install_headers(windows_headers, subdir: 'winapp') endif
lib/librte_eal/common/include/arch/x86/winapp/rte_atomic.h new file +19 -0
@@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2019 Intel Corporation +*/ + +#ifndef _ATOMIC_H_ +#define _ATOMIC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define rte_rmb () _mm_lfence() +#define rte_wmb () _mm_sfence() + +#ifdef __cplusplus +} +#endif + +#endif /* _ATOMIC_H_ */
lib/librte_eal/common/include/arch/x86/winapp/rte_pause.h new file +22 -0
@@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2019 Intel Corporation +*/ + +#ifndef _PAUSE_H_ +#define _PAUSE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +static inline void +rte_pause (void ) +{ +_mm_pause (); +} + +#ifdef __cplusplus +} +#endif + +#endif /* _PAUSE_H_ */
lib/librte_eal/winapp/eal/include/exec-env/rte_windows.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2019 Intel Corporation +*/ + +#ifndef _RTE_WINDOWS_H_ +#define _RTE_WINDOWS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define __extension__ +#define __thread __declspec(thread) + +#define strerror_r (a, b, c) strerror_s(b, c, a) + +typedef void *ssize_t ; + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_WINDOWS_H_ */
lib/librte_eal/winapp/eal/meson.build +4 -1
@@ -1,10 +1,13 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel Corporation +eal_inc += include_directories('include/exec-env') +install_subdir('include/exec-env', install_dir: get_option('includedir')) + env_objs = [] env_headers = [] env_sources = files('eal.c', 'eal_debug.c', 'eal_lcore.c', 'eal_thread.c', -) +)
Signature · 1 line
2.17.1.windows.2
PATCH 3/6 eal: Add headers for compatibility with windows environment
In reply to Anand RawatAdded headers to support windows environment for common source. These headers will have windows specific implementions of the system library apis provided in linux and freebsd.
--- .../winapp/eal/include/exec-env/fnmatch.h | 26 ++ .../winapp/eal/include/exec-env/pthread.h | 19 ++ .../winapp/eal/include/exec-env/regex.h | 54 +++ .../winapp/eal/include/exec-env/sched.h | 41 +++ .../winapp/eal/include/exec-env/sys/queue.h | 320 ++++++++++++++++++ .../winapp/eal/include/exec-env/unistd.h | 7 + 6 files changed, 467 insertions(+) create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/fnmatch.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/pthread.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/regex.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/sched.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/sys/queue.h create mode 100644 lib/librte_eal/winapp/eal/include/exec-env/unistd.h
lib/librte_eal/winapp/eal/include/exec-env/fnmatch.h new file +26 -0
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2019 Intel Corporation +*/ + +#ifndef _FNMATCH_H_ +#define _FNMATCH_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define FNM_NOMATCH 1 + +static inline int +fnmatch(const char *pattern __rte_unused, + const char *string __rte_unused, + int flags __rte_unused) +{ +return FNM_NOMATCH ; +} + +#ifdef __cplusplus +} +#endif + +#endif /* _FNMATCH_H_ */
lib/librte_eal/winapp/eal/include/exec-env/pthread.h new file +19 -0
@@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2019 Intel Corporation +*/ + +#ifndef _PTHREAD_H_ +#define _PTHREAD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef uintptr_t pthread_t ; +typedef void *pthread_attr_t ; + +#ifdef __cplusplus +} +#endif + +#endif /* _PTHREAD_H_ */
lib/librte_eal/winapp/eal/include/exec-env/regex.h new file +54 -0
54 lines not on this page · raw message
lib/librte_eal/winapp/eal/include/exec-env/sched.h new file +41 -0
41 lines not on this page · raw message
lib/librte_eal/winapp/eal/include/exec-env/sys/queue.h new file +320 -0
320 lines not on this page · raw message
lib/librte_eal/winapp/eal/include/exec-env/unistd.h new file +7 -0
@@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2019 Intel Corporation +*/ + +#ifndef _UNISTD_H_ +#define _UNISTD_H_ +#endif /* _UNISTD_H_ */
Signature · 1 line
2.17.1.windows.2
PATCH 4/6 eal: add minimum viable code for eal on windows
In reply to Anand RawatAdd windows specific logic for eal.c, eal_lcore.c, eal_debug.c and eal_thread.c. Update meson logic to build eal on windows.
--- lib/librte_eal/common/meson.build | 43 ++--- lib/librte_eal/winapp/eal/eal.c | 70 ++++++++- lib/librte_eal/winapp/eal/eal_debug.c | 13 +- lib/librte_eal/winapp/eal/eal_lcore.c | 82 ++++++++-- lib/librte_eal/winapp/eal/eal_thread.c | 147 +++++++++++++++++- .../winapp/eal/include/exec-env/regex.h | 2 + .../winapp/eal/include/exec-env/rte_windows.h | 21 +++ lib/librte_eal/winapp/eal/meson.build | 6 +- 8 files changed, 343 insertions(+), 41 deletions(-)
lib/librte_eal/common/meson.build +23 -20
@@ -5,8 +5,13 @@ eal_inc += include_directories('.', 'include', join_paths('include/arch', arch_subdir)) common_objs = [] -common_sources = [] -common_headers = [] + +common_sources = files( + 'eal_common_errno.c', + 'eal_common_launch.c', + 'eal_common_lcore.c', + 'eal_common_log.c' + ) if host_machine.system() != 'windows' common_sources = files( 'eal_common_bus.c',
@@ -14,13 +19,9 @@ if host_machine.system() != 'windows' 'eal_common_class.c', 'eal_common_devargs.c', 'eal_common_dev.c', - 'eal_common_errno.c', 'eal_common_fbarray.c', 'eal_common_hexdump.c', 'eal_common_hypervisor.c', - 'eal_common_launch.c', - 'eal_common_lcore.c', - 'eal_common_log.c', 'eal_common_memalloc.c', 'eal_common_memory.c', 'eal_common_memzone.c',
@@ -47,7 +48,22 @@ endif eal_common_arch_sources = [] eal_common_arch_objs = [] -common_headers += files('include/rte_common.h') +common_headers = files( + 'include/rte_branch_prediction.h', + 'include/rte_bus.h', + 'include/rte_common.h', + 'include/rte_debug.h', + 'include/rte_dev.h', + 'include/rte_eal.h', + 'include/rte_errno.h', + 'include/rte_launch.h', + 'include/rte_lcore.h', + 'include/rte_log.h', + 'include/rte_memory.h', + 'include/rte_pci_dev_feature_defs.h', + 'include/rte_per_lcore.h', + 'include/rte_string_fns.h' + ) if host_machine.system() != 'windows' subdir(join_paths('arch', arch_subdir)) common_sources += eal_common_arch_sources
@@ -55,39 +71,26 @@ if host_machine.system() != 'windows' common_headers += files( 'include/rte_alarm.h', - 'include/rte_branch_prediction.h', - 'include/rte_bus.h', 'include/rte_bitmap.h', 'include/rte_class.h', 'include/rte_compat.h', - 'include/rte_debug.h', 'include/rte_devargs.h', - 'include/rte_dev.h', - 'include/rte_eal.h', 'include/rte_eal_memconfig.h', 'include/rte_eal_interrupts.h', - 'include/rte_errno.h', 'include/rte_fbarray.h', 'include/rte_hexdump.h', 'include/rte_hypervisor.h', 'include/rte_interrupts.h', 'include/rte_keepalive.h', - 'include/rte_launch.h', - 'include/rte_lcore.h', - 'include/rte_log.h', 'include/rte_malloc.h', 'include/rte_malloc_heap.h', - 'include/rte_memory.h', 'include/rte_memzone.h', 'include/rte_option.h', - 'include/rte_pci_dev_feature_defs.h', 'include/rte_pci_dev_features.h', - 'include/rte_per_lcore.h', 'include/rte_random.h', 'include/rte_reciprocal.h', 'include/rte_service.h', 'include/rte_service_component.h', - 'include/rte_string_fns.h', 'include/rte_tailq.h', 'include/rte_time.h', 'include/rte_uuid.h',
lib/librte_eal/winapp/eal/eal.c +69 -1
79 lines not on this page · raw message
lib/librte_eal/winapp/eal/eal_debug.c +10 -3
@@ -2,10 +2,17 @@* Copyright(c) 2019 Intel Corporation */ -#include "rte_common.h" +#include <stdarg.h> +#include <rte_log.h> void -__rte_panic(const char *funcname __rte_unused, - const char *format __rte_unused, ...) +__rte_panic (const char *funcname,const char *format, ...) { +va_list ap; + +rte_log (RTE_LOG_CRIT ,RTE_LOGTYPE_EAL ,"PANIC in %s():\n" , funcname); +va_start (ap, format); +rte_vlog (RTE_LOG_CRIT ,RTE_LOGTYPE_EAL , format, ap); +va_end (ap); +abort (); }
lib/librte_eal/winapp/eal/eal_lcore.c +73 -9
98 lines not on this page · raw message
lib/librte_eal/winapp/eal/eal_thread.c +142 -5
157 lines not on this page · raw message
lib/librte_eal/winapp/eal/include/exec-env/regex.h +2 -0
@@ -12,6 +12,8 @@ extern "C" {#define REG_NOMATCH 1#define REG_ESPACE 12 +#include "rte_common.h" +typedef void *regex_t ;typedef void *regmatch_t ;
lib/librte_eal/winapp/eal/include/exec-env/rte_windows.h +21 -0
@@ -9,13 +9,34 @@extern "C" {#endif +#include <windows.h> +#define __extension__#define __thread __declspec(thread)#define strerror_r (a, b, c) strerror_s(b, c, a) +#define strdup (str) _strdup(str) +typedef void *ssize_t ; +typedef uintptr_t eal_thread_t ; + +/** +* Create a thread. +* This function is private to EAL. +* +* @param thread +* The location to store the thread id if successful. +* @return +* 0 for success, -1 if the thread is not created. +*/ +int +eal_thread_create (eal_thread_t *thread); + +void +eal_create_cpu_map (); + #ifdef __cplusplus }#endif
lib/librte_eal/winapp/eal/meson.build +3 -3
@@ -1,13 +1,13 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel Corporation -eal_inc += include_directories('include/exec-env') +eal_inc += include_directories('include','include/exec-env') install_subdir('include/exec-env', install_dir: get_option('includedir')) env_objs = [] env_headers = [] -env_sources = files('eal.c', - 'eal_debug.c', +env_sources = files('eal_debug.c', 'eal_lcore.c', 'eal_thread.c', + 'eal.c' )
Signature · 1 line
2.17.1.windows.2
PATCH 5/6 examples: Add meson changes for windows
In reply to Anand RawatAdd meson changes to build helloworld example on windows. Only EAL is supported currently.
--- examples/meson.build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
examples/meson.build +7 -2
@@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2019 Intel Corporation driver_libs = [] if get_option('default_library') == 'static'
@@ -35,7 +35,12 @@ foreach example: examples ext_deps = [execinfo] includes = [include_directories(example)] - deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline'] + + if host_machine.system() != 'windows' + deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline'] + else + deps = ['eal'] + endif subdir(example) if build
Signature · 1 line
2.17.1.windows.2
PATCH 6/6 doc: add documention for windows
In reply to Anand RawatAdd documentation to build helloworld example
on windows using meson and clang.
--- doc/guides/index.rst | 1 + doc/guides/windows_gsg/build_dpdk.rst | 76 +++++++++++++++++++++++++++ doc/guides/windows_gsg/index.rst | 14 +++++ doc/guides/windows_gsg/intro.rst | 20 +++++++ 4 files changed, 111 insertions(+) create mode 100644 doc/guides/windows_gsg/build_dpdk.rst create mode 100644 doc/guides/windows_gsg/index.rst create mode 100644 doc/guides/windows_gsg/intro.rst
doc/guides/index.rst +1 -0
@@ -9,6 +9,7 @@ DPDK documentation linux_gsg/index freebsd_gsg/index + windows_gsg/index sample_app_ug/index prog_guide/index howto/index
doc/guides/windows_gsg/build_dpdk.rst new file +76 -0
76 lines not on this page · raw message
doc/guides/windows_gsg/index.rst new file +14 -0
@@ -0,0 +1,14 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2018 Intel Corporation. + +.. _windows_gsg: + +Getting Started Guide for Windows +================================= + +.. toctree:: + :maxdepth: 2 + :numbered: + + intro + build_dpdk
doc/guides/windows_gsg/intro.rst new file +20 -0
@@ -0,0 +1,20 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2019 Intel Corporation. + +Introduction +============ + +This document contains instructions for installing and configuring the Data +Plane Development Kit (DPDK) software. The document describes how to compile +and run a DPDK application in a Windows* OS application environment, without +going deeply into detail. + +\*Other names and brands may be claimed as the property of others. + +Limitations +=========== + +DPDK for Windows is currently a work in progress. Not all DPDK source files +compile. Support is being added in pieces so as to limit the overall scope +of any individual patch series. The goal is to be able to run any DPDK +application natively on Windows.
Signature · 1 line
2.17.1.windows.2
Quoted 4 lines · Anand Rawat
Helloworld example for Windows.
Includes Windows-specific EAL changes and meson
changes to build the code on Windows.
Quoted 8 lines
Anand Rawat (6):
eal: eal stub to add windows support
eal: Add header files to support windows
eal: Add headers for compatibility with windows environment
eal: add minimum viable code for eal on windows
examples: Add meson changes for windows
doc: add documention for windows
Thanks for this, it's good to see some progress here with small managable patches.
I've just tried this on my laptop using clang + meson + ninja. I see some warnings at the link phase due to unknown flags, but otherwise things compile and link ok and I get helloworld app running and printing hello from all cores. Specifying a coremask doesn't seem to work though - perhaps something to look at for a V2.
Thanks,
/Bruce
Re: [PATCH 1/6] eal: eal stub to add windows support
In reply to Anand Rawat01/03/2019 08:18, Anand Rawat:
Quoted 2 lines
Added initial stub source files for windows support and meson changes to build them.
Thanks for sending some new patches based on meson.
Let's start review with some simple considerations.
Quoted 2 lines
Signed-off-by Anand Rawat <[email protected]>Signed-off-by Kadam, Pallavi <[email protected]>
Please avoid comma in names.
I think the right name is Pallavi Kadam?
Quoted 2 lines
Reviewed-by Jeffrey B Shaw <[email protected]>Reviewed-by Ranjit Menon <[email protected]>
Please make sure everybody involved here is in Cc of the emails. Git should add them automatically.
Please add me as Cc of next versions. I'm interested in the start of the Windows port. Thanks
[...]
Review
Quoted 2 lines
(quoted diff) +1
-1-# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2019 Intel Corporation
I'm not sure you need to update the dates.
In case you need to, you should probably keep the original date.
config/meson.build dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8) · line 54
Quoted 7 lines
config/meson.build +4
-3-# use pthreads -add_project_link_arguments('-pthread', language: 'c') -dpdk_extra_ldflags += '-pthread' +if host_machine.system() != 'windows' + # use pthreads + add_project_link_arguments('-pthread', language: 'c') + dpdk_extra_ldflags += '-pthread'
Why pthreads is not used in Windows?
config/meson.build dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8) · line 59
Quoted 7 lines
config/meson.build +4
-3-# some libs depend on maths lib -add_project_link_arguments('-lm', language: 'c') -dpdk_extra_ldflags += '-lm' + # some libs depend on maths lib + add_project_link_arguments('-lm', language: 'c') + dpdk_extra_ldflags += '-lm' +endif
Why libmath is not used?
config/x86/meson.build line 8
Quoted 7 lines
# get binutils version for the workaround of Bug 97config/x86/meson.build +1
-5-ldver = run_command('ld', '-v').stdout().strip() -if ldver.contains('2.30') - if cc.has_argument('-mno-avx512f') - march_opt += '-mno-avx512f' - message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97') +if host_machine.system() != 'windows'
The real fix should be to check which linker is selected by meson.
Quoted 6 lines
config/x86/meson.build +6
-0+ ldver = run_command('ld', '-v').stdout().strip() + if ldver.contains('2.30') + if cc.has_argument('-mno-avx512f') + march_opt += '-mno-avx512f' + message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97') + endif
[...]
Quoted 31 lines
lib/librte_eal/common/include/arch/x86/meson.build +11
-18-install_headers( - 'rte_atomic_32.h', - 'rte_atomic_64.h', - 'rte_atomic.h', - 'rte_byteorder_32.h', - 'rte_byteorder_64.h', - 'rte_byteorder.h', - 'rte_cpuflags.h', - 'rte_cycles.h', - 'rte_io.h', - 'rte_memcpy.h', - 'rte_prefetch.h', - 'rte_pause.h', - 'rte_rtm.h', - 'rte_rwlock.h', - 'rte_spinlock.h', - 'rte_vect.h', - subdir: get_option('include_subdir_arch')) +if host_machine.system() != 'windows' + install_headers( + 'rte_atomic_32.h', + 'rte_atomic_64.h', + 'rte_atomic.h', + 'rte_byteorder_32.h', + 'rte_byteorder_64.h', + 'rte_byteorder.h', + 'rte_cpuflags.h', + 'rte_cycles.h', + 'rte_io.h',
lib/librte_eal/common/include/arch/x86/meson.build line 24
Quoted 10 lines
lib/librte_eal/common/include/arch/x86/meson.build +10
-0+ 'rte_memcpy.h', + 'rte_prefetch.h', + 'rte_pause.h', + 'rte_rtm.h', + 'rte_rwlock.h', + 'rte_spinlock.h', + 'rte_vect.h', + subdir: get_option('include_subdir_arch') + ) +endif
The headers should not be different for Windows.
NACK for this part.
[...]
lib/librte_eal/common/include/arch/x86/meson.build elif host_machine.system() == 'freebsd' · line 21
Quoted 6 lines
lib/librte_eal/common/include/arch/x86/meson.build +2
-0@@ -17,13 +17,19 @@ elif host_machine.system() == 'freebsd' dpdk_conf.set('RTE_EXEC_ENV_BSDAPP', 1) subdir('bsdapp/eal') +elif host_machine.system() == 'windows' + dpdk_conf.set('RTE_EXEC_ENV_WINDOWS', 1)
For consistency, it should RTE_EXEC_ENV_WINAPP.
Quoted 2 lines
lib/librte_eal/common/include/arch/x86/meson.build +2
-0+ subdir('winapp/eal') +
Re: [PATCH 1/6] eal: eal stub to add windows support
Quoted 77 lines · Thomas Monjalon
01/03/2019 08:18, Anand Rawat:
Quoted 2 lines
Added initial stub source files for windows support and meson changes to build them.
Thanks for sending some new patches based on meson.
Let's start review with some simple considerations.
Quoted 2 lines
Signed-off-by Anand Rawat <[email protected]> Signed-off-by:Kadam, Pallavi <[email protected]>
Please avoid comma in names. I think the right name is Pallavi Kadam?
Quoted 2 lines
Reviewed-by Jeffrey B Shaw <[email protected]> Reviewed-by:Ranjit Menon <[email protected]>
Please make sure everybody involved here is in Cc of the emails. Git should add them automatically. Please add me as Cc of next versions. I'm interested in the start of the Windows port. Thanks
[...]
Quoted 2 lines
-# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2019 Intel Corporation
I'm not sure you need to update the dates. In case you need to, you should probably keep the original date.
Quoted 4 lines
(quoted diff) +0
-2-# use pthreads -add_project_link_arguments('-pthread', language: 'c') -dpdk_extra_ldflags += '-pthread' +if host_machine.system() !='windows' + # use pthreads + add_project_link_arguments('-pthread',
language: 'c') +dpdk_extra_ldflags+= '-pthread'Why pthreads is not used in Windows?
Quoted 4 lines
-# some libs depend on maths lib -add_project_link_arguments('-lm',
language: 'c') -dpdk_extra_ldflags += '-lm' + # some libs depend
on maths lib +add_project_link_arguments('-lm', language: 'c')+dpdk_extra_ldflags+= '-lm' +endifWhy libmath is not used?
Quoted 6 lines
# get binutils version for the workaround of Bug 97 -ldver = run_command('ld', '-v').stdout().strip() -if ldver.contains('2.30') - if cc.has_argument('-mno-avx512f') - march_opt += '-mno-avx512f' - message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97') +if host_machine.system() != 'windows'The real fix should be to check which linker is selected by meson.
Quoted 5 lines
(quoted diff) +1
-0+ ldver = run_command('ld', '-v').stdout().strip() + if
ldver.contains('2.30')+ ifcc.has_argument('-mno-avx512f')(quoted diff) +1
-0+ march_opt += '-mno-avx512f' + message('Binutils2.30 detected, disabling AVX512 support as workaround for bug #97') + endif
[...]
Quoted 14 lines
--- a/lib/librte_eal/common/include/arch/x86/meson.build +++ b/lib/librte_eal/common/include/arch/x86/meson.build -install_headers(
(quoted diff) +0
-1- 'rte_atomic_32.h', - 'rte_atomic_64.h', - 'rte_atomic.h', -'
rte_byteorder_32.h', - 'rte_byteorder_64.h', - 'rte_byteorder.h',(quoted diff) +0
-1- 'rte_cpuflags.h', - 'rte_cycles.h', - 'rte_io.h', -'
rte_memcpy.h', - 'rte_prefetch.h', - 'rte_pause.h', -
'rte_rtm.h', - 'rte_rwlock.h', - 'rte_spinlock.h', -
'rte_vect.h', - subdir:get_option('include_subdir_arch')) +ifhost_machine.system()!= 'windows' + install_headers( +
'rte_atomic_32.h', + 'rte_atomic_64.h', +
'rte_atomic.h', + 'rte_byteorder_32.h', +
'rte_byteorder_64.h', + 'rte_byteorder.h', +
'rte_cpuflags.h', + 'rte_cycles.h', + 'rte_io.h',(quoted diff) +1
-0+ 'rte_memcpy.h', + 'rte_prefetch.h', +Quoted 3 lines
'
rte_pause.h', + 'rte_rtm.h', + 'rte_rwlock.h', +
'rte_spinlock.h', + 'rte_vect.h', + subdir:get_option('include_subdir_arch')+ ) +endifThe headers should not be different for Windows. NACK for this part.
Quoted 9 lines
[...]
Review elif host_machine.system() == 'freebsd' · line 20
Quoted 5 lines
(quoted diff) +1
-0@@ -17,13 +17,19 @@ elif host_machine.system() == 'freebsd' dpdk_conf.set('RTE_EXEC_ENV_BSDAPP', 1) subdir('bsdapp/eal') +elif host_machine.system() == 'windows' + dpdk_conf.set('RTE_EXEC_ENV_WINDOWS', 1)For consistency, it should
RTE_EXEC_ENV_WINAPP.
For this one you can partially blame me - early internal review suggested changing to winapp, but I suggested holding off on the change for community consensus. Personally, I would prefer a little inconsistency and keep it as windows for clarity. In future, I also think we should just rename linxuapp to linux, and bsdapp to freebsd!
However, for now, if the majority prefer winapp, I'm ok with it. [Though I can't help reading it as winamp half the time! No llamas involved here though!]
/Bruce
Re: [PATCH 1/6] eal: eal stub to add windows support
01/03/2019 15:17, Bruce Richardson:
Quoted 5 lines · Thomas Monjalon
Quoted 4 lines
01/03/2019 08:18, Anand Rawat:
Quoted 2 lines
+elif
host_machine.system()== 'windows' +dpdk_conf.set('RTE_EXEC_ENV_WINDOWS', 1)
Quoted 7 lines
Quoted 2 lines
For consistency, it should
RTE_EXEC_ENV_WINAPP.For this one you can partially blame me - early internal review suggested changing to winapp, but I suggested holding off on the change for community consensus. Personally, I would prefer a little inconsistency and keep it as windows for clarity. In future, I also think we should just rename linxuapp to linux, and bsdapp to freebsd!
OK I agree to remove APP suffixes.
Quoted 3 lines
However, for now, if the majority prefer winapp, I'm ok with it. [Though I can't help reading it as winamp half the time! No llamas involved here though!]
Re: [PATCH 1/6] eal: eal stub to add windows support
In reply to Bruce RichardsonQuoted 21 lines · Bruce Richardson
Quoted 11 lines · Thomas Monjalon
01/03/2019 08:18, Anand Rawat:
Quoted 1 line
[...]
Review elif host_machine.system() == 'freebsd' · line 20
Quoted 5 lines
(quoted diff) +1
-0@@ -17,13 +17,19 @@ elif host_machine.system() == 'freebsd' dpdk_conf.set('RTE_EXEC_ENV_BSDAPP', 1) subdir('bsdapp/eal') +elif host_machine.system() == 'windows' + dpdk_conf.set('RTE_EXEC_ENV_WINDOWS', 1)For consistency, it should
RTE_EXEC_ENV_WINAPP.For this one you can partially blame me - early internal review suggested
changing to winapp, but I suggested holding off on the change for community
consensus. Personally, I would prefer a little inconsistency and keep it
as windows for clarity. In future, I also think we should just rename linxuapp to linux, and bsdapp to freebsd!
Quoted 7 lines
However, for now, if the majority prefer winapp, I'm ok with it. [Though I
can't help reading it as winamp half the time! No llamas involved here
though!]/Bruce
We already have many utility libs and tools in DPDK, surely it's fine to add userspace-accelerated MP3 playback too!
Signature · 2 lines
Kind regards, Luca Boccassi
Re: [PATCH 6/6] doc: add documention for windows
In reply to Anand RawatQuoted 7 lines · On Thu, 28 Feb 2019 23:18:47 -0800 Anand Rawat <[email protected]> wrote:
Add documentation to build helloworld example on windows using meson and clang.
Signed-off-by Anand Rawat <[email protected]>Signed-off-by Kadam, Pallavi <[email protected]>Reviewed-by Jeffrey B Shaw <[email protected]>Reviewed-by Ranjit Menon <[email protected]>
Please add an entry to the MAINTAINERS file for the Windows code. Also, it might be good to have a git tree that can be used for merging and staging like DPDK already has for Next-Net, Next-virtio, Next-Crypto, Next-Eventdev, ...
Re: [PATCH 6/6] doc: add documention for windows
Quoted 6 lines · Stephen Hemminger
Quoted 3 lines · On Thu, 28 Feb 2019 23:18:47 -0800 Anand Rawat <[email protected]> wrote:
Add documentation to build helloworld example on windows using meson and clang.
Quoted 9 lines
Quoted 4 lines
Signed-off-by Anand Rawat <[email protected]>Signed-off-by Kadam, Pallavi <[email protected]>Reviewed-by Jeffrey B Shaw <[email protected]>Reviewed-by Ranjit Menon <[email protected]>Please add an entry to the
MAINTAINERSfile for the Windows code. Also, it might be good to have a git tree that can be used for merging and staging like DPDK already has for Next-Net, Next-virtio, Next-Crypto, Next-Eventdev, ...
We don't have a next-* tree for Windows development, but we do have a draft repo. Thomas' plan was for these patches to be applied on a specific branch on the draft repo. Would that suffice?
ranjit m.
Quoted 13 lines · Bruce Richardson
Quoted 4 lines · Anand Rawat
Helloworld example for Windows.
Includes Windows-specific EAL changes and meson
changes to build the code on Windows.Quoted 8 lines
Anand Rawat (6):
eal: eal stub to add windows support
eal: Add header files to support windows
eal: Add headers for compatibility with windows environment
eal: add minimum viable code for eal on windows
examples: Add meson changes for windows
doc: add documention for windows
Quoted 9 lines
Thanks for this, it's good to see some progress here with small managable patches.
I've just tried this on my laptop using clang + meson + ninja. I see some warnings at the link phase due to unknown flags, but otherwise things compile and link ok and I get helloworld app running and printing hello from all cores. Specifying a coremask doesn't seem to work though - perhaps something to look at for a V2.
Some easy warnings to fix:
[dmarchan@dmarchan dpdk]$ ./devtools/checkpatches.sh
### eal: eal stub to add windows support
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #402: FILE: lib/librte_eal/winapp/eal/eal_lcore.c:9:
+eal_cpu_core_id(unsigned lcore_id)
total: 0 errors, 1 warnings, 461 lines checked Warning in /lib/librte_eal/winapp/eal/eal_debug.c:
Using rte_panic/rte_exit
### eal: add minimum viable code for eal on windows
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #239: FILE: lib/librte_eal/winapp/eal/eal_lcore.c:10:
+ unsigned numTotalProcessors;
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #240: FILE: lib/librte_eal/winapp/eal/eal_lcore.c:11:
+ unsigned numProcessorSockets;
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #241: FILE: lib/librte_eal/winapp/eal/eal_lcore.c:12:
+ unsigned numProcessorCores;
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #242: FILE: lib/librte_eal/winapp/eal/eal_lcore.c:13:
+ unsigned reserved;
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #280: FILE: lib/librte_eal/winapp/eal/eal_lcore.c:50:
+ unsigned lcore = 0;
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #281: FILE: lib/librte_eal/winapp/eal/eal_lcore.c:51:
+ for (unsigned socket = 0; socket <
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #283: FILE: lib/librte_eal/winapp/eal/eal_lcore.c:53:
+ for (unsigned core = 0; core < (win_cpu_map.numProcessorCores /
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #304: FILE: lib/librte_eal/winapp/eal/eal_lcore.c:73:
+eal_cpu_detected(unsigned lcore_id)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #313: FILE: lib/librte_eal/winapp/eal/eal_lcore.c:80:
+eal_cpu_socket_id(unsigned lcore_id)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #320: FILE: lib/librte_eal/winapp/eal/eal_lcore.c:87:
+eal_cpu_core_id(unsigned lcore_id)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #348: FILE: lib/librte_eal/winapp/eal/eal_thread.c:15:
+RTE_DEFINE_PER_LCORE(unsigned, _lcore_id) = LCORE_ID_ANY;
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #356: FILE: lib/librte_eal/winapp/eal/eal_thread.c:23:
+rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned slave_id)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #388: FILE: lib/librte_eal/winapp/eal/eal_thread.c:55:
+eal_thread_init_master(unsigned lcore_id)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #406: FILE: lib/librte_eal/winapp/eal/eal_thread.c:73:
+ unsigned lcore_id;
total: 0 errors, 14 warnings, 502 lines checked
Warning in /lib/librte_eal/winapp/eal/eal.c:
Using rte_panic/rte_exit
4/6 valid patches
[dmarchan@dmarchan dpdk]$ ./devtools/check-git-log.sh Wrong headline uppercase:
eal: Add header files to support windows
eal: Add headers for compatibility with windows environment
examples: Add meson changes for windows
Wrong tag:
Signature · 1 line
David Marchand
Sorry Bruce, wrong dest :-)
Signature · 3 lines
David Marchand On Mon, Mar 4, 2019 at 11:13 AM David Marchand <[email protected]>
Quoted 124 lines · wrote:
Quoted 16 lines · Bruce Richardson
Quoted 4 lines · Anand Rawat
Helloworld example for Windows.
Includes Windows-specific EAL changes and meson
changes to build the code on Windows.Quoted 8 lines
Anand Rawat (6):
eal: eal stub to add windows support
eal: Add header files to support windows
eal: Add headers for compatibility with windows environment
eal: add minimum viable code for eal on windows
examples: Add meson changes for windows
doc: add documention for windowsThanks for this, it's good to see some progress here with small managable patches.
Quoted 7 lines
I've just tried this on my laptop using clang + meson + ninja. I see some warnings at the link phase due to unknown flags, but otherwise things compile and link ok and I get helloworld app running and printing hello from all cores. Specifying a coremask doesn't seem to work though - perhaps
something to look at for a V2.Some easy warnings to fix:
[dmarchan@dmarchan dpdk]$
./devtools/checkpatches.sh### eal: eal stub to add windows support
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #402: FILE:
lib/librte_eal/winapp/eal/eal_lcore.c:9:
+eal_cpu_core_id(unsignedlcore_id)total: 0 errors, 1 warnings, 461 lines checked Warning in
/lib/librte_eal/winapp/eal/eal_debug.c:
Using rte_panic/rte_exit### eal: add minimum viable code for eal on windows
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #239: FILE:
lib/librte_eal/winapp/eal/eal_lcore.c:10:
+ unsigned numTotalProcessors;WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #240: FILE:
lib/librte_eal/winapp/eal/eal_lcore.c:11:
+ unsigned numProcessorSockets;WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #241: FILE:
lib/librte_eal/winapp/eal/eal_lcore.c:12:
+ unsigned numProcessorCores;WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #242: FILE:
lib/librte_eal/winapp/eal/eal_lcore.c:13:
+ unsigned reserved;WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #280: FILE:
lib/librte_eal/winapp/eal/eal_lcore.c:50:
+ unsigned lcore = 0;WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #281: FILE:
lib/librte_eal/winapp/eal/eal_lcore.c:51:
+ for (unsigned socket = 0; socket <WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #283: FILE:
lib/librte_eal/winapp/eal/eal_lcore.c:53:
+ for (unsigned core = 0; core < (win_cpu_map.numProcessorCores /WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #304: FILE:
lib/librte_eal/winapp/eal/eal_lcore.c:73:
+eal_cpu_detected(unsignedlcore_id)WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #313: FILE:
lib/librte_eal/winapp/eal/eal_lcore.c:80:
+eal_cpu_socket_id(unsignedlcore_id)WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #320: FILE:
lib/librte_eal/winapp/eal/eal_lcore.c:87:
+eal_cpu_core_id(unsignedlcore_id)WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #348: FILE:
lib/librte_eal/winapp/eal/eal_thread.c:15:
+RTE_DEFINE_PER_LCORE(unsigned,_lcore_id) =LCORE_ID_ANY;WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #356: FILE:
lib/librte_eal/winapp/eal/eal_thread.c:23:
+rte_eal_remote_launch(lcore_function_t *f, void *arg, unsignedslave_id)WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #388: FILE:
lib/librte_eal/winapp/eal/eal_thread.c:55:
+eal_thread_init_master(unsignedlcore_id)WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #406: FILE:
lib/librte_eal/winapp/eal/eal_thread.c:73:
+ unsignedlcore_id;total: 0 errors, 14 warnings, 502 lines checked
Warning in/lib/librte_eal/winapp/eal/eal.c:
Using rte_panic/rte_exit4/6 valid patches
[dmarchan@dmarchan dpdk]$
./devtools/check-git-log.shWrong headline uppercase:
eal: Add header files to support windows
eal: Add headers for compatibility with windows environment
examples: Add meson changes for windows
Wrong tag:Signed-off-by Kadam, Pallavi <[email protected]>Signed-off-by Kadam, Pallavi <[email protected]>Signed-off-by Kadam, Pallavi <[email protected]>Signed-off-by Kadam, Pallavi <[email protected]>Signed-off-by Kadam, Pallavi <[email protected]>Signed-off-by Kadam, Pallavi <[email protected]>--
David Marchand
Quoted 30 lines · David Marchand
On Fri, Mar 1, 2019 at 2:48 PM Bruce Richardson <[email protected] <mailto:[email protected]>> wrote:
On Thu, Feb 28, 2019 at 11:18:41PM -0800, Anand Rawat wrote:
> Helloworld example for Windows.
> Includes Windows-specific EAL changes and meson
> changes to build the code on Windows.
>
> Anand Rawat (6):
> eal: eal stub to add windows support
> eal: Add header files to support windows
> eal: Add headers for compatibility with windows environment > eal: add minimum viable code for eal on windows > examples: Add meson changes for windows
> doc: add documention for windows
>
Thanks for this, it's good to see some progress here with small managable
patches.I've just tried this on my laptop using clang + meson + ninja. I see some
warnings at the link phase due to unknown flags, but otherwise things compile and link ok and I get helloworld app running and printing hello from all cores. Specifying a coremask doesn't seem to work though - perhaps
something to look at for a V2.
Quoted 1 line
Some easy warnings to fix:
This will be fixed in v2.
Signature · 1 line
Anand Rawat
Re: [PATCH 6/6] doc: add documention for windows
In reply to Ranjit Menon02/03/2019 03:41, Ranjit Menon:
Quoted 12 lines · Stephen Hemminger
Quoted 11 lines
Quoted 7 lines · On Thu, 28 Feb 2019 23:18:47 -0800 Anand Rawat <[email protected]> wrote:
Add documentation to build helloworld example on windows using meson and clang.
Signed-off-by Anand Rawat <[email protected]>Signed-off-by Kadam, Pallavi <[email protected]>Reviewed-by Jeffrey B Shaw <[email protected]>Reviewed-by Ranjit Menon <[email protected]>
Quoted 7 lines
Quoted 4 lines
Please add an entry to the
MAINTAINERSfile for the Windows code. Also, it might be good to have a git tree that can be used for merging and staging like DPDK already has for Next-Net, Next-virtio, Next-Crypto, Next-Eventdev, ...We don't have a next-* tree for Windows development, but we do have a draft repo. Thomas' plan was for these patches to be applied on a specific branch on the draft repo. Would that suffice?
Yes, it's enough.
Please update your branch accordingly to help other contributors work on top of the latest changes.
About next- branches, it is used for areas which have an identified experienced maintainer. It is too early for Windows support. I will take care of integrating the first patches in master when the quality level will be sufficient.