From patchwork Wed Jun 24 14:56:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tal Shnaiderman X-Patchwork-Id: 72160 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E6F94A0350; Wed, 24 Jun 2020 16:58:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C91021D9ED; Wed, 24 Jun 2020 16:58:15 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 266921D9B0 for ; Wed, 24 Jun 2020 16:58:14 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from talshn@mellanox.com) with SMTP; 24 Jun 2020 17:58:10 +0300 Received: from l-wincomp04-vm.labs.mlnx (l-wincomp04-vm.mtl.labs.mlnx [10.237.1.5]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 05OEunYV022745; Wed, 24 Jun 2020 17:56:49 +0300 From: talshn@mellanox.com To: dev@dpdk.org Cc: thomas@monjalon.net, pallavi.kadam@intel.com, dmitry.kozliuk@gmail.com, david.marchand@redhat.com, grive@u256.net, ranjit.menon@intel.com, navasile@linux.microsoft.com, harini.ramakrishnan@microsoft.com, ocardona@microsoft.com, anatoly.burakov@intel.com, Tal Shnaiderman Date: Wed, 24 Jun 2020 17:56:20 +0300 Message-Id: <20200624145621.26604-2-talshn@mellanox.com> X-Mailer: git-send-email 2.16.1.windows.4 In-Reply-To: <20200624145621.26604-1-talshn@mellanox.com> References: <20200624145621.26604-1-talshn@mellanox.com> Subject: [dpdk-dev] [PATCH 1/2] eal/windows: Add needed calls to detect vdev PMD 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" From: Tal Shnaiderman Add needed function calls in rte_eal_init to detect vdev PMD. eal_option_device_parse() rte_service_init() rte_bus_probe() Signed-off-by: Tal Shnaiderman --- lib/librte_eal/common/meson.build | 1 + lib/librte_eal/windows/eal.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build index dc9b1d2feb..a38b66a2d0 100644 --- a/lib/librte_eal/common/meson.build +++ b/lib/librte_eal/common/meson.build @@ -30,6 +30,7 @@ if is_windows 'malloc_heap.c', 'rte_malloc.c', 'eal_common_timer.c', + 'rte_service.c', ) subdir_done() endif diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c index d8cfe5cc4d..8e89560aba 100644 --- a/lib/librte_eal/windows/eal.c +++ b/lib/librte_eal/windows/eal.c @@ -270,6 +270,11 @@ rte_eal_init(int argc, char **argv) if (fctret < 0) exit(1); + if (eal_option_device_parse()) { + rte_errno = ENODEV; + return -1; + } + /* Prevent creation of shared memory files. */ if (internal_conf->in_memory == 0) { RTE_LOG(WARNING, EAL, "Multi-process support is requested, " @@ -359,6 +364,20 @@ rte_eal_init(int argc, char **argv) rte_panic("Cannot create thread\n"); } + /* initialize services so vdevs register service during bus_probe. */ + if (rte_service_init()) { + rte_eal_init_alert("rte_service_init() failed"); + rte_errno = ENOEXEC; + return -1; + } + + /* Probe all the buses and devices/drivers on them */ + if (rte_bus_probe()) { + rte_eal_init_alert("Cannot probe devices"); + rte_errno = ENOTSUP; + return -1; + } + /* * Launch a dummy function on all slave lcores, so that master lcore * knows they are all ready when this function returns. From patchwork Wed Jun 24 14:56:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tal Shnaiderman X-Patchwork-Id: 72159 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 55EFFA0350; Wed, 24 Jun 2020 16:57:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 320441D9D9; Wed, 24 Jun 2020 16:57:55 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 109031D9B0 for ; Wed, 24 Jun 2020 16:57:53 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from talshn@mellanox.com) with SMTP; 24 Jun 2020 17:57:53 +0300 Received: from l-wincomp04-vm.labs.mlnx (l-wincomp04-vm.mtl.labs.mlnx [10.237.1.5]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 05OEunYW022745; Wed, 24 Jun 2020 17:56:49 +0300 From: talshn@mellanox.com To: dev@dpdk.org Cc: thomas@monjalon.net, pallavi.kadam@intel.com, dmitry.kozliuk@gmail.com, david.marchand@redhat.com, grive@u256.net, ranjit.menon@intel.com, navasile@linux.microsoft.com, harini.ramakrishnan@microsoft.com, ocardona@microsoft.com, anatoly.burakov@intel.com, Tal Shnaiderman Date: Wed, 24 Jun 2020 17:56:21 +0300 Message-Id: <20200624145621.26604-3-talshn@mellanox.com> X-Mailer: git-send-email 2.16.1.windows.4 In-Reply-To: <20200624145621.26604-1-talshn@mellanox.com> References: <20200624145621.26604-1-talshn@mellanox.com> Subject: [dpdk-dev] [PATCH 2/2] bus/vdev: 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" From: Tal Shnaiderman current support will build vdev with empty MP functions currently unsupported for Windows Signed-off-by: Tal Shnaiderman --- drivers/bus/vdev/meson.build | 6 ------ lib/librte_eal/rte_eal_exports.def | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/bus/vdev/meson.build b/drivers/bus/vdev/meson.build index abaf36f1dd..967d54e4f8 100644 --- a/drivers/bus/vdev/meson.build +++ b/drivers/bus/vdev/meson.build @@ -1,12 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -if host_machine.system() == 'windows' - build = false - reason = 'not supported on Windows' - subdir_done() -endif - sources = files('vdev.c', 'vdev_params.c') install_headers('rte_bus_vdev.h') diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def index 374e654264..0714a810d8 100644 --- a/lib/librte_eal/rte_eal_exports.def +++ b/lib/librte_eal/rte_eal_exports.def @@ -5,6 +5,7 @@ EXPORTS rte_calloc_socket rte_bus_register rte_dev_is_probed + rte_devargs_insert rte_devargs_next rte_devargs_remove rte_eal_get_configuration @@ -21,6 +22,8 @@ EXPORTS rte_eal_tailq_register rte_eal_using_phys_addrs rte_free + rte_log_register + rte_log_set_level rte_malloc rte_malloc_dump_stats rte_malloc_get_socket_stats @@ -54,6 +57,7 @@ EXPORTS rte_memzone_walk rte_strerror rte_strsplit + rte_sys_gettid rte_vfio_container_dma_map rte_vfio_container_dma_unmap rte_vlog