[dpdk-dev] [PATCH v2 3/9] eal: add windows compatible header files

Pallavi Kadam pallavi.kadam at intel.com
Mon Sep 30 19:49:40 CEST 2019


Hi Jerin,

On 9/27/2019 12:58 AM, Jerin Jacob wrote:
> On Fri, Sep 27, 2019 at 2:24 AM Pallavi Kadam <pallavi.kadam at intel.com> wrote:
>> 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.
>>
>> Adding getopt.h to support parsing options on Windows.
>>
>> Adding rte_vect.h as Windows fails to compile:
>> \common\include\arch\x86\rte_vect.h.
>>
>> Signed-off-by: Antara Ganesh Kolar <antara.ganesh.kolar at intel.com>
>> Signed-off-by: Pallavi Kadam <pallavi.kadam at intel.com>
>> Reviewed-by: Ranjit Menon <ranjit.menon at intel.com>
>> Reviewed-by: Keith Wiles <keith.wiles at intel.com>
>> ---
>> diff --git a/lib/librte_eal/windows/eal/include/rte_vect.h b/lib/librte_eal/windows/eal/include/rte_vect.h
>> new file mode 100644
>> index 000000000..630473e28
>> --- /dev/null
>> +++ b/lib/librte_eal/windows/eal/include/rte_vect.h
>> @@ -0,0 +1,9 @@
>> +/* SPDX-License-Identifier: BSD-3-Clause
>> + * Copyright(c) 2019 Intel Corporation
>> + */
>> +
>> +#pragma once
>> +
>> +#define __ICC  1600
>> +
>> +#include "..\..\common\include\arch\x86\rte_vect.h"
> I understand there is a compilation error with generic rte_vect.h with
> windows from the git commit.
> But above hardcoding to x86 will create an issue for another arch.
> Please fix the compilation
> for generic rte_vect.h or introduce vect.h as OS-specific and have
> implementation for Linux and FreeBSD.

The error is due to conflict types in the compilers. Clang compiler and 
Windows SDK

both declare _m_prefetchw() in x86intrin.h file which is included from 
generic rte_vect.h.

Error is as below:

C:\Program Files\LLVM\lib\clang\8.0.0\include\prfchwintrin.h:64:1: 
error: conflicting types for '_m_prefetchw'

_m_prefetchw(void *__P)

^

C:\Program Files (x86)\Windows 
Kits\10\include\10.0.17763.0\um\winnt.h:3275:1: note: previous 
declaration is here

_m_prefetchw (

^


Is it ok to include #ifdef for other architectures in the above file itself?

>
>
>
>
>> --
>> 2.18.0.windows.1
>>


More information about the dev mailing list