From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anand Rawat Subject: [PATCH v8 01/10] eal: eal stub to add windows support Date: Mon, 1 Apr 2019 20:54:49 -0700 Message-ID: <20190402035458.14664-2-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> <20190402035458.14664-1-anand.rawat@intel.com> Cc: anand.rawat@intel.com, pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, bruce.richardson@intel.com, thomas@monjalon.net To: dev@dpdk.org Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 954D854AE for ; Tue, 2 Apr 2019 05:55:01 +0200 (CEST) In-Reply-To: <20190402035458.14664-1-anand.rawat@intel.com> 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. Updated the MAINTAINERS list for windows support. Signed-off-by: Pallavi Kadam Signed-off-by: Anand Rawat Reviewed-by: Jeff Shaw Reviewed-by: Ranjit Menon --- MAINTAINERS | 7 ++++++ lib/librte_eal/windows/eal/eal.c | 14 +++++++++++ lib/librte_eal/windows/eal/eal_debug.c | 15 ++++++++++++ lib/librte_eal/windows/eal/eal_lcore.c | 32 +++++++++++++++++++++++++ lib/librte_eal/windows/eal/eal_thread.c | 18 ++++++++++++++ 5 files changed, 86 insertions(+) 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 diff --git a/MAINTAINERS b/MAINTAINERS index 9f34f905f..5d70fba9b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -283,6 +283,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/lib/librte_eal/windows/eal/eal.c b/lib/librte_eal/windows/eal/eal.c new file mode 100644 index 000000000..37ed42233 --- /dev/null +++ b/lib/librte_eal/windows/eal/eal.c @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2019 Intel Corporation + */ + +#include + + /* Launch threads, called at application init(). */ +int +rte_eal_init(int argc __rte_unused, char **argv __rte_unused) +{ + /* TODO */ + /* This is a stub, not the expected result */ + 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..a9705e257 --- /dev/null +++ b/lib/librte_eal/windows/eal/eal_debug.c @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2019 Intel Corporation + */ + +#include + + /* call abort(), it will generate a coredump if enabled */ +void +__rte_panic(const char *funcname __rte_unused, + const char *format __rte_unused, ...) +{ + /* TODO */ + /* This is a stub, not the expected result */ + 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..e4fcb2615 --- /dev/null +++ b/lib/librte_eal/windows/eal/eal_lcore.c @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2019 Intel Corporation + */ + +#include + + /* Get the cpu core id value */ +unsigned int +eal_cpu_core_id(unsigned int lcore_id) +{ + /* TODO */ + /* This is a stub, not the expected result */ + 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) +{ + /* TODO */ + /* This is a stub, not the expected result */ + return 1; +} + +/* Get CPU socket id (NUMA node) for a logical core */ +unsigned int +eal_cpu_socket_id(unsigned int cpu_id __rte_unused) +{ + /* TODO */ + /* This is a stub, not the expected result */ + 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..f701443c3 --- /dev/null +++ b/lib/librte_eal/windows/eal/eal_thread.c @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2019 Intel Corporation + */ + +#include + +#include + +typedef uintptr_t eal_thread_t; + +/* function to create threads */ +int +eal_thread_create(eal_thread_t *thread __rte_unused) +{ + /* TODO */ + /* This is a stub, not the expected result */ + return 0; +} -- 2.17.1.windows.2