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 CE8BEA2EDB for ; Tue, 1 Oct 2019 01:11:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D6B6E1BEDA; Tue, 1 Oct 2019 01:11:18 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 4BF491BED7 for ; Tue, 1 Oct 2019 01:11:17 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Sep 2019 16:11:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,568,1559545200"; d="scan'208";a="203054643" Received: from unknown (HELO [10.241.225.191]) ([10.241.225.191]) by orsmga002.jf.intel.com with ESMTP; 30 Sep 2019 16:11:15 -0700 To: Jerin Jacob Cc: dpdk-dev , Thomas Monjalon , Harini.Ramakrishnan@microsoft.com, keith.wiles@intel.com, "Richardson, Bruce" , ranjit.menon@intel.com, antara.ganesh.kolar@intel.com References: <20190909195404.4760-1-pallavi.kadam@intel.com> <20190926202924.6876-1-pallavi.kadam@intel.com> <20190926202924.6876-6-pallavi.kadam@intel.com> From: Pallavi Kadam Message-ID: Date: Mon, 30 Sep 2019 16:11:15 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v2 5/9] eal: add additional function overrides in windows 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" Hi Jerin, On 9/27/2019 1:06 AM, Jerin Jacob wrote: > On Fri, Sep 27, 2019 at 2:25 AM Pallavi Kadam wrote: >> Adding additional function definitions for pthread, cpuset >> implementation, asprintf implementation, in order to support >> common code. >> >> Signed-off-by: Pallavi Kadam >> Signed-off-by: Antara Ganesh Kolar >> Reviewed-by: Ranjit Menon >> Reviewed-by: Keith Wiles >> --- >> lib/librte_eal/common/include/rte_lcore.h | 5 ++ >> lib/librte_eal/windows/eal/include/pthread.h | 66 +++++++++++++++++++ >> lib/librte_eal/windows/eal/include/rte_os.h | 28 ++++++++ >> lib/librte_eal/windows/eal/include/sched.h | 58 ++++++++++++++-- >> .../windows/eal/include/sys/queue.h | 8 +++ >> 5 files changed, 159 insertions(+), 6 deletions(-) >> >> diff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h >> index c86f72eb1..d5e7e3e33 100644 >> --- a/lib/librte_eal/common/include/rte_lcore.h >> +++ b/lib/librte_eal/common/include/rte_lcore.h >> @@ -64,6 +64,11 @@ typedef cpuset_t rte_cpuset_t; >> CPU_NAND(&tmp, src); \ >> CPU_COPY(&tmp, dst); \ >> } while (0) >> +#elif defined(_WIN64) >> +#define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2) >> +#define RTE_CPU_OR(dst, src1, src2) CPU_OR(dst, src1, src2) >> +#define RTE_CPU_FILL(set) CPU_FILL(set) >> +#define RTE_CPU_NOT(dst, src) CPU_NOT(dst, src) > RTE_CPU* definitions are OS-specific. Instead of adding new #elif and > make the common > code less readable. Please create eal abstraction for the same and > move Linux, FreeBSD, Windows to the specific > directory to avoid #ifdef clutter in lib/librte_eal/common/include/rte_lcore.h. Thanks for the comments. We have submitted a patch to move RTE_CPU* definitions to the OS-specific directory. Please ACK when possible. https://patches.dpdk.org/patch/60244/. Thanks, > >> #endif >>