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 199A4A09EF; Tue, 22 Dec 2020 01:53:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE3C3CAC0; Tue, 22 Dec 2020 01:52:31 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id E2D2CCAA2 for ; Tue, 22 Dec 2020 01:52:26 +0100 (CET) IronPort-SDR: sQMzZdPmgDMWIES66q+43/Fm3SQmv/YKHWF9CnVk3ZI6p0Aabvd1xo4ahs3SC8QyUoHvZ16WQA rclehwg6RXOg== X-IronPort-AV: E=McAfee;i="6000,8403,9842"; a="155017041" X-IronPort-AV: E=Sophos;i="5.78,437,1599548400"; d="scan'208";a="155017041" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2020 16:52:22 -0800 IronPort-SDR: pc36SSWdJjbRVqSsdmgRxyaJIBh2pU7pZc3tTF8FaW3mgcOkzjoaPXSFpzZnE+YLdD+4sfnHZq 34tZ4Zp03axg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,437,1599548400"; d="scan'208";a="560558205" Received: from win-dpdk-pallavi.jf.intel.com (HELO localhost.localdomain) ([10.166.188.111]) by orsmga005.jf.intel.com with ESMTP; 21 Dec 2020 16:52:21 -0800 From: Pallavi Kadam To: dev@dpdk.org, thomas@monjalon.net Cc: ranjit.menon@intel.com, dmitry.kozliuk@gmail.com, bruce.richardson@intel.com, ferruh.yigit@intel.com, beilei.xing@intel.com, jia.guo@intel.com, Narcisa.Vasile@microsoft.com, talshn@nvidia.com, pallavi.kadam@intel.com Date: Mon, 21 Dec 2020 16:45:10 -0800 Message-Id: <20201222004511.12948-2-pallavi.kadam@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20201222004511.12948-1-pallavi.kadam@intel.com> References: <20201217225909.3580-1-pallavi.kadam@intel.com> <20201222004511.12948-1-pallavi.kadam@intel.com> Subject: [dpdk-dev] [PATCH v3 1/2] eal: add rte_random.c file 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" This file is required to compile and build i40e PMD on Windows. Add rte_rand variable to export file. Redefine _m_prefetchw for Clang toolchain due to following error with respect to conflicting types: FAILED: lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj.rsp In file included from ../lib/librte_eal/common/rte_random.c:13: In file included from ..\lib/librte_eal/include\rte_eal.h:20: In file included from ..\lib/librte_eal/include\rte_per_lcore.h:25: In file included from ..\lib/librte_eal/windows/include\pthread.h:21: In file included from ..\lib/librte_eal/windows/include\rte_windows.h:27: In file included from C:\Program Files (x86)\Windows Kits\10\include\ 10.0.18362.0\um\windows.h:171: In file included from C:\Program Files (x86)\Windows Kits\10\include\ 10.0.18362.0\shared\windef.h:24: In file included from C:\Program Files (x86)\Windows Kits\10\include\ 10.0.18362.0\shared\minwindef.h:182: C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\ winnt.h:3324:1: error: conflicting types for '_m_prefetchw' _m_prefetchw ( ^ C:\Program Files\LLVM\lib\clang\10.0.0\include\prfchwintrin.h:50:1: note: previous definition is here _m_prefetchw(void *__P) ^ 1 error generated. Signed-off-by: Pallavi Kadam Reviewed-by: Ranjit Menon --- lib/librte_eal/common/meson.build | 1 + lib/librte_eal/rte_eal_exports.def | 1 + lib/librte_eal/windows/include/rte_windows.h | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build index 39abf7a0a..98e8fffd4 100644 --- a/lib/librte_eal/common/meson.build +++ b/lib/librte_eal/common/meson.build @@ -33,6 +33,7 @@ if is_windows 'malloc_heap.c', 'rte_malloc.c', 'eal_common_timer.c', + 'rte_random.c', 'rte_service.c', ) subdir_done() diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def index 6a6be1cfa..a2ad4d633 100644 --- a/lib/librte_eal/rte_eal_exports.def +++ b/lib/librte_eal/rte_eal_exports.def @@ -114,6 +114,7 @@ EXPORTS rte_memzone_reserve_bounded rte_memzone_walk rte_openlog_stream + rte_rand rte_realloc rte_rtm_supported rte_service_attr_get diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h index b82af34f6..0063b5d78 100644 --- a/lib/librte_eal/windows/include/rte_windows.h +++ b/lib/librte_eal/windows/include/rte_windows.h @@ -18,6 +18,12 @@ #define WIN32_LEAN_AND_MEAN #endif +/* Override Windows SDK definition of _m_prefetchw to avoid conflicting types */ +#ifdef RTE_TOOLCHAIN_CLANG +#undef _m_prefetchw +#define _m_prefetchw __m_prefetchw +#endif + /* Must come first. */ #include -- 2.18.0.windows.1