From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 67DFFA04B3; Mon, 27 Jan 2020 23:41:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 49EBA1BFEC; Mon, 27 Jan 2020 23:41:27 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 7516F1BFDD for ; Mon, 27 Jan 2020 23:41:25 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A124321AF2; Mon, 27 Jan 2020 17:41:24 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 27 Jan 2020 17:41:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=Hwt8rtnhLlIrNyD7C0tl80x2aNi7ogSsweYr9BIn5oI=; b=nUonyUzgVeVc j9RJ0tMnJDMO4fAZ1Mamfr8CVxIHhUJLnTF+33RdJkkrsSunD6ONVcMi6NLVhTMZ mc9AylpytG3zYUmoSgp1oHBQ63BpGtpazqo/gZZ8PDmte/6hGQ0R2uehXjg5nsxB xu4JKjPWkNPfMzJlpsCzTzPZGFmPN5M= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Hwt8rtnhLlIrNyD7C0tl80x2aNi7ogSsweYr9BIn5 oI=; b=ciArGB5BY2ffCupkW+70CUVTxmKwNGXKkq+hFkg+wqaKoVIeDV3sEBQ2Y sxlJ7GpKPaYMEfOHZH+aeL6TppJg6Yn00rtbnKpJPdPpCXHkRk3FXcKgEWKn8WYX RA1KDmp5uhKoTOL/SJBsbiDBrQBpsbz7UUFQiRjisaHzUxibgfASEPa98GWzoq/4 iqsD1E//e6QzlxENR9Vts1VYgy3eig2h7SGfusLynSqiyFEIcHcAitLHTXM6qylU J3j9HPuzRfC/8Z5ki+hbhZT3EEj0hQiSKKLHDAhY5MWsr8pJ9v/tayKx6cXNizBW gUSUD9MPWY5TXW19ZTf0DR+m7fZjQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrfedvgdduieduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1893A306A869; Mon, 27 Jan 2020 17:41:23 -0500 (EST) From: Thomas Monjalon To: Pallavi Kadam Cc: dev@dpdk.org, Harini.Ramakrishnan@microsoft.com, keith.wiles@intel.com, bruce.richardson@intel.com, david.marchand@redhat.com, jerinjacobk@gmail.com, ranjit.menon@intel.com, antara.ganesh.kolar@intel.com, stephen@networkplumber.org Date: Mon, 27 Jan 2020 23:41:21 +0100 Message-ID: <1736661.tdWV9SEqCh@xps> In-Reply-To: <20200113215534.10084-4-pallavi.kadam@intel.com> References: <20200109031312.6344-1-pallavi.kadam@intel.com> <20200113215534.10084-1-pallavi.kadam@intel.com> <20200113215534.10084-4-pallavi.kadam@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v5 3/9] eal: add windows compatible header files 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" 13/01/2020 22:55, Pallavi Kadam: > Modified \common\include\arch\x86\rte_vect.h > to include SSE4 header for Windows. > > Adding dlfcn.h on Windows to support common code. > > Adding eal_filesystem.h to support functions and > path defines for files and directories on Windows. I don't see any relationship between these 3 items, so I think they should be 3 separate patches. > --- a/lib/librte_eal/common/include/arch/x86/rte_vect.h > +++ b/lib/librte_eal/common/include/arch/x86/rte_vect.h > @@ -15,7 +15,9 @@ > #include > #include "generic/rte_vect.h" > > -#if (defined(__ICC) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) > +#if (defined(__ICC) || \ > + (defined(_WIN64)) || \ > + (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) > > #include /* SSE4 */ I trust you on this change :) > --- /dev/null > +++ b/lib/librte_eal/windows/eal/include/dlfcn.h > @@ -0,0 +1,21 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2019 Intel Corporation > + */ > + > +#ifndef _DLFCN_H_ > +#define _DLFCN_H_ > + > +/** > + * This file is added to support common code in eal_common_options.c > + * as Microsoft libc does not contain dlfcn.h. This may be removed > + * in future releases. > + */ > + > +/* The windows port does not currently support dynamic loading of libraries, > + * so fail these calls > + */ > +#define dlopen(lib, flag) (0) > +#define RTLD_NOW 0 > +#define dlerror() ("Not supported!") This is only for the function eal_plugins_init(). The plugin logic and directory search might be different on Windows. I believe it would be better handled directly in eal_plugins_init(). For now, my advice is to not compile this function (and not call it in Windows init of course): int eal_plugins_init(void) { #ifndef RTE_EXEC_ENV_WINDOWS The right fix would be to move this "common" function in an UNIX-only file: What about creating eal_unix_options.c file? Could be in lib/librte_eal/unix/ directory? > --- /dev/null > +++ b/lib/librte_eal/windows/eal/include/eal_filesystem.h > @@ -0,0 +1,99 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2019 Intel Corporation > + */ > + > +/** > + * @file > + * Stores functions and path defines for files and directories > + * on the filesystem for Windows, that are used by the Windows EAL. > + */ [...] > +/** Function to read a single numeric value from a file on the filesystem. > + * Used to read information from files on /sys > + */ > +int eal_parse_sysfs_value(const char *filename, unsigned long *val); Given that sysfs is a Linux system, I guess you don't need this function at all.