From patchwork Wed Mar 6 04:16:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Rawat X-Patchwork-Id: 50845 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 489154CA7; Wed, 6 Mar 2019 05:16:41 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id D34E12C17 for ; Wed, 6 Mar 2019 05:16:36 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2019 20:16:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,446,1544515200"; d="scan'208";a="304752065" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga005.jf.intel.com with ESMTP; 05 Mar 2019 20:16:34 -0800 From: Anand Rawat To: dev@dpdk.org Cc: pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, thomas@monjalon.net Date: Tue, 5 Mar 2019 20:16:29 -0800 Message-Id: <20190306041634.12976-2-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190306041634.12976-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v2 1/6] eal: eal stub to add windows support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Added initial stub source files for windows support and meson changes to build them. Signed-off-by: Anand Rawat Signed-off-by: Pallavi Kadam Reviewed-by: Jeff Shaw Reviewed-by: Ranjit Menon --- config/meson.build | 22 ++++--- config/x86/meson.build | 14 +++-- lib/librte_eal/common/meson.build | 84 ++++++++++++++----------- lib/librte_eal/meson.build | 10 ++- lib/librte_eal/windows/eal/eal.c | 11 ++++ lib/librte_eal/windows/eal/eal_debug.c | 12 ++++ lib/librte_eal/windows/eal/eal_lcore.c | 26 ++++++++ lib/librte_eal/windows/eal/eal_thread.c | 15 +++++ lib/librte_eal/windows/eal/meson.build | 10 +++ lib/meson.build | 6 +- meson.build | 34 +++++----- 11 files changed, 176 insertions(+), 68 deletions(-) create mode 100644 lib/librte_eal/windows/eal/eal.c create mode 100644 lib/librte_eal/windows/eal/eal_debug.c create mode 100644 lib/librte_eal/windows/eal/eal_lcore.c create mode 100644 lib/librte_eal/windows/eal/eal_thread.c create mode 100644 lib/librte_eal/windows/eal/meson.build diff --git a/config/meson.build b/config/meson.build index 0419607d3..37adf5b03 100644 --- a/config/meson.build +++ b/config/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation # set the machine type and cflags for it if meson.is_cross_build() @@ -52,18 +52,26 @@ dpdk_extra_ldflags += '-Wl,--no-as-needed' 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' +if cc.find_library('lm', required : false).found() + # 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 diff --git a/config/x86/meson.build b/config/x86/meson.build index 7504cb9e5..558edfda9 100644 --- a/config/x86/meson.build +++ b/config/x86/meson.build @@ -1,15 +1,17 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-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 diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build index 5ecae0b1f..c010e8737 100644 --- a/lib/librte_eal/common/meson.build +++ b/lib/librte_eal/common/meson.build @@ -1,58 +1,65 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation eal_inc += include_directories('.', 'include', join_paths('include/arch', arch_subdir)) common_objs = [] -common_sources = files( - 'eal_common_bus.c', - 'eal_common_cpuflags.c', - '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', - 'eal_common_options.c', - 'eal_common_proc.c', - 'eal_common_string_fns.c', - 'eal_common_tailqs.c', - 'eal_common_thread.c', - 'eal_common_timer.c', - 'eal_common_uuid.c', - 'hotplug_mp.c', - 'malloc_elem.c', - 'malloc_heap.c', - 'malloc_mp.c', - 'rte_keepalive.c', - 'rte_malloc.c', - 'rte_option.c', - 'rte_reciprocal.c', - 'rte_service.c' -) +common_sources = [] +common_headers = [] +if host_machine.system() != 'windows' + common_sources = files( + 'eal_common_bus.c', + 'eal_common_cpuflags.c', + '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', + 'eal_common_options.c', + 'eal_common_proc.c', + 'eal_common_string_fns.c', + 'eal_common_tailqs.c', + 'eal_common_thread.c', + 'eal_common_timer.c', + 'eal_common_uuid.c', + 'hotplug_mp.c', + 'malloc_elem.c', + 'malloc_heap.c', + 'malloc_mp.c', + 'rte_keepalive.c', + 'rte_malloc.c', + 'rte_option.c', + 'rte_reciprocal.c', + 'rte_service.c' + ) +endif # get architecture specific sources and objs eal_common_arch_sources = [] eal_common_arch_objs = [] -subdir(join_paths('arch', arch_subdir)) + +common_headers += files('include/rte_common.h') +if host_machine.system() != 'windows' + subdir(join_paths('arch', arch_subdir)) +endif common_sources += eal_common_arch_sources common_objs += eal_common_arch_objs -common_headers = files( +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_common.h', 'include/rte_compat.h', 'include/rte_debug.h', 'include/rte_devargs.h', @@ -85,7 +92,8 @@ common_headers = files( 'include/rte_tailq.h', 'include/rte_time.h', 'include/rte_uuid.h', - 'include/rte_version.h') + 'include/rte_version.h' +) # special case install the generic headers, since they go in a subdir generic_headers = files( diff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build index 98c1d1f31..61b654557 100644 --- a/lib/librte_eal/meson.build +++ b/lib/librte_eal/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-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('windows/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 diff --git a/lib/librte_eal/windows/eal/eal.c b/lib/librte_eal/windows/eal/eal.c new file mode 100644 index 000000000..134452a77 --- /dev/null +++ b/lib/librte_eal/windows/eal/eal.c @@ -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; +} diff --git a/lib/librte_eal/windows/eal/eal_debug.c b/lib/librte_eal/windows/eal/eal_debug.c new file mode 100644 index 000000000..012eeccfa --- /dev/null +++ b/lib/librte_eal/windows/eal/eal_debug.c @@ -0,0 +1,12 @@ +/* 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, ...) +{ + abort(); +} diff --git a/lib/librte_eal/windows/eal/eal_lcore.c b/lib/librte_eal/windows/eal/eal_lcore.c new file mode 100644 index 000000000..be7adeb18 --- /dev/null +++ b/lib/librte_eal/windows/eal/eal_lcore.c @@ -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 int +eal_cpu_core_id(unsigned int 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 int lcore_id __rte_unused) +{ + return 1; +} + +/* Get CPU socket id (NUMA node) for a logical core */ +unsigned int +eal_cpu_socket_id(unsigned int cpu_id __rte_unused) +{ + return 0; +} diff --git a/lib/librte_eal/windows/eal/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c new file mode 100644 index 000000000..222bd8f4d --- /dev/null +++ b/lib/librte_eal/windows/eal/eal_thread.c @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2018 Intel Corporation + */ + +#include + +#include "rte_common.h" + +typedef uintptr_t eal_thread_t; + +int +eal_thread_create(eal_thread_t *thread __rte_unused) +{ + return 0; +} diff --git a/lib/librte_eal/windows/eal/meson.build b/lib/librte_eal/windows/eal/meson.build new file mode 100644 index 000000000..8b1735623 --- /dev/null +++ b/lib/librte_eal/windows/eal/meson.build @@ -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', +) diff --git a/lib/meson.build b/lib/meson.build index 99957ba7d..995c0e1ac 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-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' diff --git a/meson.build b/meson.build index 69833de82..856e94c37 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation project('DPDK', 'C', version: '19.05.0-rc0', @@ -13,6 +13,7 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] +driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] dpdk_app_link_libraries = [] @@ -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, From patchwork Wed Mar 6 04:16:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Rawat X-Patchwork-Id: 50844 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6D6594C96; Wed, 6 Mar 2019 05:16:39 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id DCA3D2C18 for ; Wed, 6 Mar 2019 05:16:36 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2019 20:16:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,446,1544515200"; d="scan'208";a="304752068" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga005.jf.intel.com with ESMTP; 05 Mar 2019 20:16:34 -0800 From: Anand Rawat To: dev@dpdk.org Cc: pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, thomas@monjalon.net Date: Tue, 5 Mar 2019 20:16:30 -0800 Message-Id: <20190306041634.12976-3-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190306041634.12976-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v2 2/6] eal: add header files to support windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Added header files to support windows on x86 platforms. Updated rte_config to include rte_windows.h for windows build. Signed-off-by: Anand Rawat Signed-off-by: Pallavi Kadam Reviewed-by: Jeff Shaw Reviewed-by: Ranjit Menon --- config/rte_config.h | 7 +++++- .../eal/include/exec-env/rte_windows.h | 23 +++++++++++++++++++ lib/librte_eal/windows/eal/meson.build | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 lib/librte_eal/windows/eal/include/exec-env/rte_windows.h diff --git a/config/rte_config.h b/config/rte_config.h index 7606f5d7b..1ad7e1d30 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2017 Intel Corporation + * Copyright(c) 2017-2019 Intel Corporation */ /** @@ -118,4 +118,9 @@ /* QEDE PMD defines */ #define RTE_LIBRTE_QEDE_FW "" +/* windows specific*/ +#ifdef RTE_EXEC_ENV_WINDOWS +#include +#endif + #endif /* _RTE_CONFIG_H_ */ diff --git a/lib/librte_eal/windows/eal/include/exec-env/rte_windows.h b/lib/librte_eal/windows/eal/include/exec-env/rte_windows.h new file mode 100644 index 000000000..8e4dc72bb --- /dev/null +++ b/lib/librte_eal/windows/eal/include/exec-env/rte_windows.h @@ -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_ */ diff --git a/lib/librte_eal/windows/eal/meson.build b/lib/librte_eal/windows/eal/meson.build index 8b1735623..d6c540f82 100644 --- a/lib/librte_eal/windows/eal/meson.build +++ b/lib/librte_eal/windows/eal/meson.build @@ -1,6 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel Corporation +eal_inc += include_directories('include/exec-env') + env_objs = [] env_headers = [] env_sources = files('eal.c', From patchwork Wed Mar 6 04:16:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Rawat X-Patchwork-Id: 50846 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E4FD4CC0; Wed, 6 Mar 2019 05:16:42 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 7F3FA2C18 for ; Wed, 6 Mar 2019 05:16:37 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2019 20:16:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,446,1544515200"; d="scan'208";a="304752071" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga005.jf.intel.com with ESMTP; 05 Mar 2019 20:16:35 -0800 From: Anand Rawat To: dev@dpdk.org Cc: pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, thomas@monjalon.net Date: Tue, 5 Mar 2019 20:16:31 -0800 Message-Id: <20190306041634.12976-4-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190306041634.12976-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v2 3/6] eal: add headers for compatibility with windows environment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Added 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. Signed-off-by: Anand Rawat Signed-off-by: Pallavi Kadam Reviewed-by: Jeff Shaw Reviewed-by: Ranjit Menon --- .../windows/eal/include/exec-env/fnmatch.h | 25 ++ .../windows/eal/include/exec-env/pthread.h | 19 ++ .../windows/eal/include/exec-env/regex.h | 50 +++ .../windows/eal/include/exec-env/sched.h | 41 +++ .../windows/eal/include/exec-env/sys/queue.h | 320 ++++++++++++++++++ .../windows/eal/include/exec-env/unistd.h | 7 + 6 files changed, 462 insertions(+) create mode 100644 lib/librte_eal/windows/eal/include/exec-env/fnmatch.h create mode 100644 lib/librte_eal/windows/eal/include/exec-env/pthread.h create mode 100644 lib/librte_eal/windows/eal/include/exec-env/regex.h create mode 100644 lib/librte_eal/windows/eal/include/exec-env/sched.h create mode 100644 lib/librte_eal/windows/eal/include/exec-env/sys/queue.h create mode 100644 lib/librte_eal/windows/eal/include/exec-env/unistd.h diff --git a/lib/librte_eal/windows/eal/include/exec-env/fnmatch.h b/lib/librte_eal/windows/eal/include/exec-env/fnmatch.h new file mode 100644 index 000000000..1422ba56a --- /dev/null +++ b/lib/librte_eal/windows/eal/include/exec-env/fnmatch.h @@ -0,0 +1,25 @@ +/* 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(__rte_unused const char *pattern, + __rte_unused const char *string, + __rte_unused int flags) +{ + return FNM_NOMATCH; +} + +#ifdef __cplusplus +} +#endif + +#endif /* _FNMATCH_H_ */ diff --git a/lib/librte_eal/windows/eal/include/exec-env/pthread.h b/lib/librte_eal/windows/eal/include/exec-env/pthread.h new file mode 100644 index 000000000..431550577 --- /dev/null +++ b/lib/librte_eal/windows/eal/include/exec-env/pthread.h @@ -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_ */ diff --git a/lib/librte_eal/windows/eal/include/exec-env/regex.h b/lib/librte_eal/windows/eal/include/exec-env/regex.h new file mode 100644 index 000000000..efd3f1ecd --- /dev/null +++ b/lib/librte_eal/windows/eal/include/exec-env/regex.h @@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2019 Intel Corporation + */ + +#ifndef _REGEX_H_ +#define _REGEX_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define REG_NOMATCH 1 +#define REG_ESPACE 12 + +typedef void *regex_t; +typedef void *regmatch_t; + +static inline int regcomp(__rte_unused regex_t *preg, + __rte_unused const char *regex, __rte_unused int cflags) +{ + return REG_ESPACE; +} + +static inline int regexec(__rte_unused const regex_t *preg, + __rte_unused const char *string, __rte_unused size_t nmatch, + __rte_unused regmatch_t pmatch[], __rte_unused int eflags) +{ + return REG_NOMATCH; +} + +static inline size_t regerror(__rte_unused int errcode, + __rte_unused const regex_t *preg, char *errbuf, + __rte_unused size_t errbuf_size) +{ + if (errbuf) { + *errbuf = '\0'; + return 1; + } + return 0; +} + +static inline void regfree(__rte_unused regex_t *preg) +{ +} + +#ifdef __cplusplus +} +#endif + +#endif /* _REGEX_H_ */ diff --git a/lib/librte_eal/windows/eal/include/exec-env/sched.h b/lib/librte_eal/windows/eal/include/exec-env/sched.h new file mode 100644 index 000000000..b105c43c3 --- /dev/null +++ b/lib/librte_eal/windows/eal/include/exec-env/sched.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2019 Intel Corporation + */ + +#ifndef _SCHED_H_ +#define _SCHED_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef CPU_SET_SIZE +#define CPU_SET_SIZE RTE_MAX_LCORE +#endif + +#define _BITS_PER_SET (sizeof(long long) * 8) +#define _BIT_SET_MASK (_BITS_PER_SET - 1) + +#define _NUM_SETS(b) (((b) + _BIT_SET_MASK) / _BITS_PER_SET) +#define _WHICH_SET(b) ((b) / _BITS_PER_SET) +#define _WHICH_BIT(b) ((b) & (_BITS_PER_SET - 1)) + +typedef struct _rte_cpuset_s { + long long _bits[_NUM_SETS(CPU_SET_SIZE)]; +} rte_cpuset_t; + +#define CPU_SET(b, s) ((s)->_bits[_WHICH_SET(b)] |= (1LL << _WHICH_BIT(b))) + +#define CPU_ZERO(s) \ + do { \ + unsigned int _i; \ + \ + for (_i = 0; _i < _NUM_SETS(CPU_SET_SIZE); _i++) \ + (s)->_bits[_i] = 0LL; \ + } while (0) + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHED_H_ */ diff --git a/lib/librte_eal/windows/eal/include/exec-env/sys/queue.h b/lib/librte_eal/windows/eal/include/exec-env/sys/queue.h new file mode 100644 index 000000000..5ee4916ad --- /dev/null +++ b/lib/librte_eal/windows/eal/include/exec-env/sys/queue.h @@ -0,0 +1,320 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#ifndef _SYS_QUEUE_H_ +#define _SYS_QUEUE_H_ + +/* + * This file defines tail queues. + * + * A tail queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or + * after an existing element, at the head of the list, or at the end of + * the list. A tail queue may be traversed in either direction. + * + * Below is a summary of implemented functions where: + * + means the macro is available + * - means the macro is not available + * s means the macro is available but is slow (runs in O(n) time) + * + * TAILQ + * _HEAD + + * _CLASS_HEAD + + * _HEAD_INITIALIZER + + * _ENTRY + + * _CLASS_ENTRY + + * _INIT + + * _EMPTY + + * _FIRST + + * _NEXT + + * _PREV + + * _LAST + + * _LAST_FAST + + * _FOREACH + + * _FOREACH_FROM + + * _FOREACH_SAFE + + * _FOREACH_FROM_SAFE + + * _FOREACH_REVERSE + + * _FOREACH_REVERSE_FROM + + * _FOREACH_REVERSE_SAFE + + * _FOREACH_REVERSE_FROM_SAFE + + * _INSERT_HEAD + + * _INSERT_BEFORE + + * _INSERT_AFTER + + * _INSERT_TAIL + + * _CONCAT + + * _REMOVE_AFTER - + * _REMOVE_HEAD - + * _REMOVE + + * _SWAP + + * + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#define QMD_TRACE_ELEM(elem) +#define QMD_TRACE_HEAD(head) +#define TRACEBUF +#define TRACEBUF_INITIALIZER + +#define TRASHIT(x) +#define QMD_IS_TRASHED(x) 0 + +#define QMD_SAVELINK(name, link) + +#ifdef __cplusplus +/* + * In C++ there can be structure lists and class lists: + */ +#define QUEUE_TYPEOF(type) type +#else +#define QUEUE_TYPEOF(type) struct type +#endif + +/* + * Tail queue declarations. + */ +#define TAILQ_HEAD(name, type) \ +struct name { \ + struct type *tqh_first; /* first element */ \ + struct type **tqh_last; /* addr of last next element */ \ + TRACEBUF \ +} + +#define TAILQ_CLASS_HEAD(name, type) \ +struct name { \ + class type *tqh_first; /* first element */ \ + class type **tqh_last; /* addr of last next element */ \ + TRACEBUF \ +} + +#define TAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).tqh_first, TRACEBUF_INITIALIZER } + +#define TAILQ_ENTRY(type) \ +struct { \ + struct type *tqe_next; /* next element */ \ + struct type **tqe_prev; /* address of previous next element */ \ + TRACEBUF \ +} + +#define TAILQ_CLASS_ENTRY(type) \ +struct { \ + class type *tqe_next; /* next element */ \ + class type **tqe_prev; /* address of previous next element */ \ + TRACEBUF \ +} + +/* + * Tail queue functions. + */ +#define QMD_TAILQ_CHECK_HEAD(head, field) +#define QMD_TAILQ_CHECK_TAIL(head, headname) +#define QMD_TAILQ_CHECK_NEXT(elm, field) +#define QMD_TAILQ_CHECK_PREV(elm, field) + +#define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ + (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ + (head1)->tqh_last = (head2)->tqh_last; \ + TAILQ_INIT((head2)); \ + QMD_TRACE_HEAD(head1); \ + QMD_TRACE_HEAD(head2); \ + } \ +} while (0) + +#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) + +#define TAILQ_FIRST(head) ((head)->tqh_first) + +#define TAILQ_FOREACH(var, head, field) \ + for ((var) = TAILQ_FIRST((head)); \ + (var); \ + (var) = TAILQ_NEXT((var), field)) + +#define TAILQ_FOREACH_FROM(var, head, field) \ + for ((var) = ((var) ? (var) : TAILQ_FIRST((head))); \ + (var); \ + (var) = TAILQ_NEXT((var), field)) + +#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = TAILQ_FIRST((head)); \ + (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ + (var) = (tvar)) + +#define TAILQ_FOREACH_FROM_SAFE(var, head, field, tvar) \ + for ((var) = ((var) ? (var) : TAILQ_FIRST((head))); \ + (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ + (var) = (tvar)) + +#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = TAILQ_LAST((head), headname); \ + (var); \ + (var) = TAILQ_PREV((var), headname, field)) + +#define TAILQ_FOREACH_REVERSE_FROM(var, head, headname, field) \ + for ((var) = ((var) ? (var) : TAILQ_LAST((head), headname)); \ + (var); \ + (var) = TAILQ_PREV((var), headname, field)) + +#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ + for ((var) = TAILQ_LAST((head), headname); \ + (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ + (var) = (tvar)) + +#define TAILQ_FOREACH_REVERSE_FROM_SAFE(var, head, headname, field, tvar) \ + for ((var) = ((var) ? (var) : TAILQ_LAST((head), headname)); \ + (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ + (var) = (tvar)) + +#define TAILQ_INIT(head) do { \ + TAILQ_FIRST((head)) = NULL; \ + (head)->tqh_last = &TAILQ_FIRST((head)); \ + QMD_TRACE_HEAD(head); \ +} while (0) + +#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + QMD_TAILQ_CHECK_NEXT(listelm, field); \ + TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field); \ + if (TAILQ_NEXT((listelm), field) != NULL) \ + TAILQ_NEXT((elm), field)->field.tqe_prev = \ + &TAILQ_NEXT((elm), field); \ + else { \ + (head)->tqh_last = &TAILQ_NEXT((elm), field); \ + QMD_TRACE_HEAD(head); \ + } \ + TAILQ_NEXT((listelm), field) = (elm); \ + (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \ + QMD_TRACE_ELEM(&(elm)->field); \ + QMD_TRACE_ELEM(&(listelm)->field); \ +} while (0) + +#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ + QMD_TAILQ_CHECK_PREV(listelm, field); \ + (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ + TAILQ_NEXT((elm), field) = (listelm); \ + *(listelm)->field.tqe_prev = (elm); \ + (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \ + QMD_TRACE_ELEM(&(elm)->field); \ + QMD_TRACE_ELEM(&(listelm)->field); \ +} while (0) + +#define TAILQ_INSERT_HEAD(head, elm, field) do { \ + QMD_TAILQ_CHECK_HEAD(head, field); \ + TAILQ_NEXT((elm), field) = TAILQ_FIRST((head)); \ + if (TAILQ_FIRST((head)) != NULL) \ + TAILQ_FIRST((head))->field.tqe_prev = \ + &TAILQ_NEXT((elm), field); \ + else \ + (head)->tqh_last = &TAILQ_NEXT((elm), field); \ + TAILQ_FIRST((head)) = (elm); \ + (elm)->field.tqe_prev = &TAILQ_FIRST((head)); \ + QMD_TRACE_HEAD(head); \ + QMD_TRACE_ELEM(&(elm)->field); \ +} while (0) + +#define TAILQ_INSERT_TAIL(head, elm, field) do { \ + QMD_TAILQ_CHECK_TAIL(head, field); \ + TAILQ_NEXT((elm), field) = NULL; \ + (elm)->field.tqe_prev = (head)->tqh_last; \ + *(head)->tqh_last = (elm); \ + (head)->tqh_last = &TAILQ_NEXT((elm), field); \ + QMD_TRACE_HEAD(head); \ + QMD_TRACE_ELEM(&(elm)->field); \ +} while (0) + +#define TAILQ_LAST(head, headname) \ + (*(((struct headname *)((head)->tqh_last))->tqh_last)) + +/* + * The FAST function is fast in that it causes no data access other + * then the access to the head. The standard LAST function above + * will cause a data access of both the element you want and + * the previous element. FAST is very useful for instances when + * you may want to prefetch the last data element. + */ +#define TAILQ_LAST_FAST(head, type, field) \ + (TAILQ_EMPTY(head) ? NULL : __containerof((head)->tqh_last, \ + QUEUE_TYPEOF(type), field.tqe_next)) + +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) + +#define TAILQ_PREV(elm, headname, field) \ + (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) + +#define TAILQ_REMOVE(head, elm, field) do { \ + QMD_SAVELINK(oldnext, (elm)->field.tqe_next); \ + QMD_SAVELINK(oldprev, (elm)->field.tqe_prev); \ + QMD_TAILQ_CHECK_NEXT(elm, field); \ + QMD_TAILQ_CHECK_PREV(elm, field); \ + if ((TAILQ_NEXT((elm), field)) != NULL) \ + TAILQ_NEXT((elm), field)->field.tqe_prev = \ + (elm)->field.tqe_prev; \ + else { \ + (head)->tqh_last = (elm)->field.tqe_prev; \ + QMD_TRACE_HEAD(head); \ + } \ + *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \ + TRASHIT(*oldnext); \ + TRASHIT(*oldprev); \ + QMD_TRACE_ELEM(&(elm)->field); \ +} while (0) + +#define TAILQ_SWAP(head1, head2, type, field) do { \ + QUEUE_TYPEOF(type) * swap_first = (head1)->tqh_first; \ + QUEUE_TYPEOF(type) * *swap_last = (head1)->tqh_last; \ + (head1)->tqh_first = (head2)->tqh_first; \ + (head1)->tqh_last = (head2)->tqh_last; \ + (head2)->tqh_first = swap_first; \ + (head2)->tqh_last = swap_last; \ + swap_first = (head1)->tqh_first; \ + if (swap_first != NULL) \ + swap_first->field.tqe_prev = &(head1)->tqh_first; \ + else \ + (head1)->tqh_last = &(head1)->tqh_first; \ + swap_first = (head2)->tqh_first; \ + if (swap_first != NULL) \ + swap_first->field.tqe_prev = &(head2)->tqh_first; \ + else \ + (head2)->tqh_last = &(head2)->tqh_first; \ +} while (0) + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_QUEUE_H_ */ diff --git a/lib/librte_eal/windows/eal/include/exec-env/unistd.h b/lib/librte_eal/windows/eal/include/exec-env/unistd.h new file mode 100644 index 000000000..4973fc793 --- /dev/null +++ b/lib/librte_eal/windows/eal/include/exec-env/unistd.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2019 Intel Corporation + */ + +#ifndef _UNISTD_H_ +#define _UNISTD_H_ +#endif /* _UNISTD_H_ */ From patchwork Wed Mar 6 04:16:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Rawat X-Patchwork-Id: 50847 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 49E304D3A; Wed, 6 Mar 2019 05:16:43 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id C36294C94 for ; Wed, 6 Mar 2019 05:16:37 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2019 20:16:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,446,1544515200"; d="scan'208";a="304752074" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga005.jf.intel.com with ESMTP; 05 Mar 2019 20:16:35 -0800 From: Anand Rawat To: dev@dpdk.org Cc: pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, thomas@monjalon.net Date: Tue, 5 Mar 2019 20:16:32 -0800 Message-Id: <20190306041634.12976-5-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190306041634.12976-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v2 4/6] eal: add minimum viable code for eal on windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add windows specific logic for eal.c, eal_lcore.c, eal_debug.c and eal_thread.c. Update meson logic to build eal on windows. Signed-off-by: Anand Rawat Signed-off-by: Pallavi Kadam Reviewed-by: Jeff Shaw Reviewed-by: Ranjit Menon --- lib/librte_eal/common/meson.build | 94 +++++------ lib/librte_eal/windows/eal/eal.c | 70 ++++++++- lib/librte_eal/windows/eal/eal_debug.c | 12 +- lib/librte_eal/windows/eal/eal_lcore.c | 97 ++++++++++-- lib/librte_eal/windows/eal/eal_thread.c | 146 +++++++++++++++++- .../windows/eal/include/exec-env/regex.h | 2 + .../eal/include/exec-env/rte_windows.h | 24 +++ 7 files changed, 379 insertions(+), 66 deletions(-) diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build index c010e8737..759516e2a 100644 --- a/lib/librte_eal/common/meson.build +++ b/lib/librte_eal/common/meson.build @@ -5,8 +5,14 @@ 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 +20,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 +49,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)) endif @@ -55,45 +72,32 @@ common_sources += eal_common_arch_sources common_objs += eal_common_arch_objs 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', - 'include/rte_version.h' -) + 'include/rte_alarm.h', + 'include/rte_bitmap.h', + 'include/rte_class.h', + 'include/rte_compat.h', + 'include/rte_devargs.h', + 'include/rte_eal_memconfig.h', + 'include/rte_eal_interrupts.h', + 'include/rte_fbarray.h', + 'include/rte_hexdump.h', + 'include/rte_hypervisor.h', + 'include/rte_interrupts.h', + 'include/rte_keepalive.h', + 'include/rte_malloc.h', + 'include/rte_malloc_heap.h', + 'include/rte_memzone.h', + 'include/rte_option.h', + 'include/rte_pci_dev_features.h', + 'include/rte_random.h', + 'include/rte_reciprocal.h', + 'include/rte_service.h', + 'include/rte_service_component.h', + 'include/rte_tailq.h', + 'include/rte_time.h', + 'include/rte_uuid.h', + 'include/rte_version.h' + ) # special case install the generic headers, since they go in a subdir generic_headers = files( diff --git a/lib/librte_eal/windows/eal/eal.c b/lib/librte_eal/windows/eal/eal.c index 134452a77..1c6923e20 100644 --- a/lib/librte_eal/windows/eal/eal.c +++ b/lib/librte_eal/windows/eal/eal.c @@ -2,10 +2,78 @@ * Copyright(c) 2019 Intel Corporation */ -#include "rte_common.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static struct rte_config rte_config; +struct lcore_config lcore_config[RTE_MAX_LCORE]; + +struct rte_config * +rte_eal_get_configuration(void) +{ + return &rte_config; +} + +static int +sync_func(void *arg __rte_unused) +{ + return 0; +} + +static void +rte_eal_init_alert(const char *msg) +{ + fprintf(stderr, "EAL: FATAL: %s\n", msg); + RTE_LOG(ERR, EAL, "%s\n", msg); +} int rte_eal_init(int argc __rte_unused, char **argv __rte_unused) { + int i; + + /* create a map of all processors in the system */ + eal_create_cpu_map(); + + if (rte_eal_cpu_init() < 0) { + rte_eal_init_alert("Cannot detect lcores."); + rte_errno = ENOTSUP; + return -1; + } + + eal_thread_init_master(rte_config.master_lcore); + + RTE_LCORE_FOREACH_SLAVE(i) { + + /* + * create communication pipes between master thread + * and children + */ + if (_pipe(lcore_config[i].pipe_master2slave, + sizeof(char), _O_BINARY) < 0) + rte_panic("Cannot create pipe\n"); + if (_pipe(lcore_config[i].pipe_slave2master, + sizeof(char), _O_BINARY) < 0) + rte_panic("Cannot create pipe\n"); + + lcore_config[i].state = WAIT; + + /* create a thread for each lcore */ + if (eal_thread_create(&lcore_config[i].thread_id) != 0) + rte_panic("Cannot create thread\n"); + } + + /* + * Launch a dummy function on all slave lcores, so that master lcore + * knows they are all ready when this function returns. + */ + rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER); + rte_eal_mp_wait_lcore(); return 0; } diff --git a/lib/librte_eal/windows/eal/eal_debug.c b/lib/librte_eal/windows/eal/eal_debug.c index 012eeccfa..72e5cb97e 100644 --- a/lib/librte_eal/windows/eal/eal_debug.c +++ b/lib/librte_eal/windows/eal/eal_debug.c @@ -2,11 +2,17 @@ * Copyright(c) 2019 Intel Corporation */ -#include "rte_common.h" +#include +#include 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(); } diff --git a/lib/librte_eal/windows/eal/eal_lcore.c b/lib/librte_eal/windows/eal/eal_lcore.c index be7adeb18..7d73c9358 100644 --- a/lib/librte_eal/windows/eal/eal_lcore.c +++ b/lib/librte_eal/windows/eal/eal_lcore.c @@ -2,25 +2,98 @@ * Copyright(c) 2019 Intel Corporation */ -#include "rte_common.h" +#include +#include - /* Get the cpu core id value */ -unsigned int -eal_cpu_core_id(unsigned int lcore_id) +/* global data structure that contains the CPU map */ +static struct _wcpu_map { + unsigned int total_procs; + unsigned int proc_sockets; + unsigned int proc_cores; + unsigned int reserved; + struct _win_lcore_map { + uint8_t socket_id; + uint8_t core_id; + } wlcore_map[RTE_MAX_LCORE]; +} wcpu_map = { 0 }; + +/* + * Create a map of all processors and associated cores on the system + */ +void +eal_create_cpu_map() { - return lcore_id; + wcpu_map.total_procs = + GetActiveProcessorCount(ALL_PROCESSOR_GROUPS); + + LOGICAL_PROCESSOR_RELATIONSHIP lprocRel; + DWORD lprocInfoSize = 0; + BOOL ht_enabled = FALSE; + + /* First get the processor package information */ + lprocRel = RelationProcessorPackage; + /* Determine the size of buffer we need (pass NULL) */ + GetLogicalProcessorInformationEx(lprocRel, NULL, &lprocInfoSize); + wcpu_map.proc_sockets = lprocInfoSize / 48; + + lprocInfoSize = 0; + /* Next get the processor core information */ + lprocRel = RelationProcessorCore; + GetLogicalProcessorInformationEx(lprocRel, NULL, &lprocInfoSize); + wcpu_map.proc_cores = lprocInfoSize / 48; + + if (wcpu_map.total_procs > wcpu_map.proc_cores) + ht_enabled = TRUE; + + /* Distribute the socket and core ids appropriately + * across the logical cores. For now, split the cores + * equally across the sockets. + */ + unsigned int lcore = 0; + for (unsigned int socket = 0; socket < + wcpu_map.proc_sockets; ++socket) { + for (unsigned int core = 0; + core < (wcpu_map.proc_cores / wcpu_map.proc_sockets); + ++core) { + wcpu_map.wlcore_map[lcore] + .socket_id = socket; + wcpu_map.wlcore_map[lcore] + .core_id = core; + lcore++; + if (ht_enabled) { + wcpu_map.wlcore_map[lcore] + .socket_id = socket; + wcpu_map.wlcore_map[lcore] + .core_id = core; + lcore++; + } + } + } } -/* Check if a cpu is present by the presence of the cpu information for it */ +/* + * Check if a cpu is present by the presence of the cpu information for it + */ int -eal_cpu_detected(unsigned int lcore_id __rte_unused) +eal_cpu_detected(unsigned int lcore_id) { - return 1; + return (lcore_id < wcpu_map.total_procs); } -/* Get CPU socket id (NUMA node) for a logical core */ -unsigned int -eal_cpu_socket_id(unsigned int cpu_id __rte_unused) +/* + * Get CPU socket id for a logical core + */ +unsigned +eal_cpu_socket_id(unsigned int lcore_id) +{ + return wcpu_map.wlcore_map[lcore_id].socket_id; +} + +/* + * Get the cpu core id value + */ +unsigned +eal_cpu_core_id(unsigned int lcore_id) { - return 0; + return wcpu_map.wlcore_map[lcore_id].core_id; } diff --git a/lib/librte_eal/windows/eal/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c index 222bd8f4d..200ce0156 100644 --- a/lib/librte_eal/windows/eal/eal_thread.c +++ b/lib/librte_eal/windows/eal/eal_thread.c @@ -1,15 +1,151 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2018 Intel Corporation + * Copyright(c) 2019 Intel Corporation */ -#include +#include +#include +#include +#include +#include +#include +#include -#include "rte_common.h" +#include "eal_thread.h" -typedef uintptr_t eal_thread_t; +RTE_DEFINE_PER_LCORE(unsigned int, _lcore_id) = LCORE_ID_ANY; +/* + * Send a message to a slave lcore identified by slave_id to call a + * function f with argument arg. Once the execution is done, the + * remote lcore switch in FINISHED state. + */ int -eal_thread_create(eal_thread_t *thread __rte_unused) +rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned int slave_id) { + int n; + char c = 0; + int m2s = lcore_config[slave_id].pipe_master2slave[1]; + int s2m = lcore_config[slave_id].pipe_slave2master[0]; + + if (lcore_config[slave_id].state != WAIT) + return -EBUSY; + + lcore_config[slave_id].f = f; + lcore_config[slave_id].arg = arg; + + /* send message */ + n = 0; + while (n == 0 || (n < 0 && errno == EINTR)) + n = _write(m2s, &c, 1); + if (n < 0) + rte_panic("cannot write on configuration pipe\n"); + + /* wait ack */ + do { + n = _read(s2m, &c, 1); + } while (n < 0 && errno == EINTR); + + if (n <= 0) + rte_panic("cannot read on configuration pipe\n"); + + return 0; +} + +void +eal_thread_init_master(unsigned int lcore_id) +{ + /* set the lcore ID in per-lcore memory area */ + RTE_PER_LCORE(_lcore_id) = lcore_id; +} + +static inline eal_thread_t +eal_thread_self(void) +{ + return GetCurrentThreadId(); +} + +/* main loop of threads */ +void * +eal_thread_loop(void *arg __rte_unused) +{ + char c; + int n, ret; + unsigned int lcore_id; + eal_thread_t thread_id; + int m2s, s2m; + char cpuset[RTE_CPU_AFFINITY_STR_LEN]; + + thread_id = eal_thread_self(); + + /* retrieve our lcore_id from the configuration structure */ + RTE_LCORE_FOREACH_SLAVE(lcore_id) { + if (thread_id == lcore_config[lcore_id].thread_id) + break; + } + if (lcore_id == RTE_MAX_LCORE) + rte_panic("cannot retrieve lcore id\n"); + + m2s = lcore_config[lcore_id].pipe_master2slave[0]; + s2m = lcore_config[lcore_id].pipe_slave2master[1]; + + /* set the lcore ID in per-lcore memory area */ + RTE_PER_LCORE(_lcore_id) = lcore_id; + + RTE_LOG(DEBUG, EAL, "lcore %u is ready (tid=%zx;cpuset=[%s])\n", + lcore_id, (uintptr_t)thread_id, cpuset); + + /* read on our pipe to get commands */ + while (1) { + void *fct_arg; + + /* wait command */ + do { + n = _read(m2s, &c, 1); + } while (n < 0 && errno == EINTR); + + if (n <= 0) + rte_panic("cannot read on configuration pipe\n"); + + lcore_config[lcore_id].state = RUNNING; + + /* send ack */ + n = 0; + while (n == 0 || (n < 0 && errno == EINTR)) + n = _write(s2m, &c, 1); + if (n < 0) + rte_panic("cannot write on configuration pipe\n"); + + if (lcore_config[lcore_id].f == NULL) + rte_panic("NULL function pointer\n"); + + /* call the function and store the return value */ + fct_arg = lcore_config[lcore_id].arg; + ret = lcore_config[lcore_id].f(fct_arg); + lcore_config[lcore_id].ret = ret; + rte_wmb(); + + /* when a service core returns, it should go directly to WAIT + * state, because the application will not lcore_wait() for it. + */ + if (lcore_config[lcore_id].core_role == ROLE_SERVICE) + lcore_config[lcore_id].state = WAIT; + else + lcore_config[lcore_id].state = FINISHED; + } +} + +int +eal_thread_create(eal_thread_t *thread) +{ + HANDLE th; + + th = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)eal_thread_loop, + NULL, 0, (LPDWORD)thread); + if (!th) + return -1; + + SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS); + SetThreadPriority(th, THREAD_PRIORITY_TIME_CRITICAL); + return 0; } diff --git a/lib/librte_eal/windows/eal/include/exec-env/regex.h b/lib/librte_eal/windows/eal/include/exec-env/regex.h index efd3f1ecd..512e5723e 100644 --- a/lib/librte_eal/windows/eal/include/exec-env/regex.h +++ b/lib/librte_eal/windows/eal/include/exec-env/regex.h @@ -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; diff --git a/lib/librte_eal/windows/eal/include/exec-env/rte_windows.h b/lib/librte_eal/windows/eal/include/exec-env/rte_windows.h index 8e4dc72bb..9f1a9ad62 100644 --- a/lib/librte_eal/windows/eal/include/exec-env/rte_windows.h +++ b/lib/librte_eal/windows/eal/include/exec-env/rte_windows.h @@ -9,13 +9,37 @@ extern "C" { #endif +#include + #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); + +/** + * Create a map of processors and cores on the system. + * This function is private to EAL. + * + */ +void eal_create_cpu_map(void); + #ifdef __cplusplus } #endif From patchwork Wed Mar 6 04:16:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Rawat X-Patchwork-Id: 50849 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D1A215587; Wed, 6 Mar 2019 05:16:45 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 016884C95 for ; Wed, 6 Mar 2019 05:16:37 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2019 20:16:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,446,1544515200"; d="scan'208";a="304752079" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga005.jf.intel.com with ESMTP; 05 Mar 2019 20:16:35 -0800 From: Anand Rawat To: dev@dpdk.org Cc: pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, thomas@monjalon.net Date: Tue, 5 Mar 2019 20:16:33 -0800 Message-Id: <20190306041634.12976-6-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190306041634.12976-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v2 5/6] examples: add meson changes for windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add meson changes to build helloworld example on windows. Only EAL is supported currently. Signed-off-by: Anand Rawat Signed-off-by: Pallavi Kadam Reviewed-by: Jeff Shaw Reviewed-by: Ranjit Menon --- examples/meson.build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index af81c762e..2e638399e 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-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 From patchwork Wed Mar 6 04:16:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Rawat X-Patchwork-Id: 50848 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A796F4C95; Wed, 6 Mar 2019 05:16:44 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 495364C96 for ; Wed, 6 Mar 2019 05:16:38 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2019 20:16:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,446,1544515200"; d="scan'208";a="304752082" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga005.jf.intel.com with ESMTP; 05 Mar 2019 20:16:36 -0800 From: Anand Rawat To: dev@dpdk.org Cc: pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, thomas@monjalon.net Date: Tue, 5 Mar 2019 20:16:34 -0800 Message-Id: <20190306041634.12976-7-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190306041634.12976-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v2 6/6] doc: add documention for windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Added documentation to build helloworld example on windows using meson and clang. Updated the maintainers list to include windows maintainers. Signed-off-by: Anand Rawat Signed-off-by: Pallavi Kadam Reviewed-by: Jeff Shaw Reviewed-by: Ranjit Menon --- MAINTAINERS | 7 +++ doc/guides/index.rst | 3 +- doc/guides/windows_gsg/build_dpdk.rst | 67 +++++++++++++++++++++++++++ doc/guides/windows_gsg/index.rst | 14 ++++++ doc/guides/windows_gsg/intro.rst | 20 ++++++++ 5 files changed, 110 insertions(+), 1 deletion(-) 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 diff --git a/MAINTAINERS b/MAINTAINERS index 097cfb4f3..c1187da8c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -272,6 +272,13 @@ FreeBSD UIO M: Bruce Richardson F: kernel/freebsd/nic_uio/ +Windows support +M: Harini Ramakrishnan +M: Omar Cardona +M: Anand Rawat +M: Ranjit Menon +F: lib/librte_eal/windows/ + Core Libraries -------------- diff --git a/doc/guides/index.rst b/doc/guides/index.rst index 8a9ed65c8..8a1601b27 100644 --- a/doc/guides/index.rst +++ b/doc/guides/index.rst @@ -1,5 +1,5 @@ .. SPDX-License-Identifier: BSD-3-Clause - Copyright(c) 2010-2014 Intel Corporation. + Copyright(c) 2010-2019 Intel Corporation. DPDK documentation ================== @@ -9,6 +9,7 @@ DPDK documentation linux_gsg/index freebsd_gsg/index + windows_gsg/index sample_app_ug/index prog_guide/index howto/index diff --git a/doc/guides/windows_gsg/build_dpdk.rst b/doc/guides/windows_gsg/build_dpdk.rst new file mode 100644 index 000000000..7cfb4856e --- /dev/null +++ b/doc/guides/windows_gsg/build_dpdk.rst @@ -0,0 +1,67 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2019 Intel Corporation. + +Compiling the DPDK Target from Source +===================================== + +System Requirements +------------------- + +The DPDK and its applications require the Clang-LLVM* C compiler and linker. +The Meson* Build system is used to prepare the sources +for compilation with the Ninja backend. + +\*Other names and brands may be claimed as the property of others. + +Install the Compiler +-------------------- + +Download and install the clang compiler from `LLVM* website `_. +For example, Clang-LLVM direct download link:: + + http://releases.llvm.org/7.0.1/LLVM-7.0.1-win64.exe + + +Install the Build System +------------------------ + +Download and install the build system from `Meson's website`_. +A good option to choose is the MSI installer for both meson and ninja together:: + + http://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer%22 + +Install the Backend +------------------- + +If using Ninja, download and install the backend from `Ninja's website`_ or +install along with the meson build system. + +Build the code +-------------- + +The build environment is setup to build the EAL and the helloworld example by +default. + +Using the ninja backend +~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: console + + cd C:\Users\me\dpdk + meson build + cd build + ninja + +Run the helloworld example +========================== + +Navigate to the build directory and run `dpdk-helloworld.exe`. + +.. code-block:: console + + cd C:\Users\me\dpdk\build + helloworld.exe + hello from core 1 + hello from core 3 + hello from core 0 + hello from core 2 diff --git a/doc/guides/windows_gsg/index.rst b/doc/guides/windows_gsg/index.rst new file mode 100644 index 000000000..d9b7990a8 --- /dev/null +++ b/doc/guides/windows_gsg/index.rst @@ -0,0 +1,14 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2019 Intel Corporation. + +.. _windows_gsg: + +Getting Started Guide for Windows +================================= + +.. toctree:: + :maxdepth: 2 + :numbered: + + intro + build_dpdk diff --git a/doc/guides/windows_gsg/intro.rst b/doc/guides/windows_gsg/intro.rst new file mode 100644 index 000000000..a0285732d --- /dev/null +++ b/doc/guides/windows_gsg/intro.rst @@ -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.