Disable i40e avx512 code path for windows build to avoid the mingw build error. Fixes: e6a6a138919f ("net/i40e: add AVX512 vector path") Signed-off-by: Leyi Rong <leyi.rong@intel.com> --- config/x86/cross-mingw | 3 +++ drivers/net/i40e/meson.build | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/x86/cross-mingw b/config/x86/cross-mingw index 4c15a7fa2e..48a82b457e 100644 --- a/config/x86/cross-mingw +++ b/config/x86/cross-mingw @@ -11,3 +11,6 @@ system = 'windows' cpu_family = 'x86_64' cpu = 'native' endian = 'little' + +[properties] +c_args = '-mno-avx512f' diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build index c0acdf4fd4..c9a1a50407 100644 --- a/drivers/net/i40e/meson.build +++ b/drivers/net/i40e/meson.build @@ -54,7 +54,7 @@ if arch_subdir == 'x86' cc.has_argument('-mavx512f') and cc.has_argument('-mavx512bw')) - if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true + if not is_windows and (i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true) cflags += ['-DCC_AVX512_SUPPORT'] avx512_args = [cflags, '-mavx512f', '-mavx512bw'] if cc.has_argument('-march=skylake-avx512') -- 2.17.1
On 1/26/2021 7:38 AM, Leyi Rong wrote:
> Disable i40e avx512 code path for windows build to
> avoid the mingw build error.
>
> Fixes: e6a6a138919f ("net/i40e: add AVX512 vector path")
>
> Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> ---
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Verified on Windows using MinGW and clang compiler.
> Subject: [dpdk-dev] [PATCH] net/i40e: fix mingw build error > > External email: Use caution opening links or attachments > > > Disable i40e avx512 code path for windows build to avoid the mingw build > error. > > Fixes: e6a6a138919f ("net/i40e: add AVX512 vector path") > > Signed-off-by: Leyi Rong <leyi.rong@intel.com> > --- > config/x86/cross-mingw | 3 +++ > drivers/net/i40e/meson.build | 2 +- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/config/x86/cross-mingw b/config/x86/cross-mingw index > 4c15a7fa2e..48a82b457e 100644 > --- a/config/x86/cross-mingw > +++ b/config/x86/cross-mingw > @@ -11,3 +11,6 @@ system = 'windows' > cpu_family = 'x86_64' > cpu = 'native' > endian = 'little' > + > +[properties] > +c_args = '-mno-avx512f' Should be in a different patch since it effects the whole project. > diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build > index c0acdf4fd4..c9a1a50407 100644 > --- a/drivers/net/i40e/meson.build > +++ b/drivers/net/i40e/meson.build > @@ -54,7 +54,7 @@ if arch_subdir == 'x86' > cc.has_argument('-mavx512f') and > cc.has_argument('-mavx512bw')) > > - if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true > + if not is_windows and (i40e_avx512_cpu_support == true or > + i40e_avx512_cc_support == true) DmitryK already mentioned it previously; you only need to disabled MinGW64 since clang isn't seeing those errors. > cflags += ['-DCC_AVX512_SUPPORT'] > avx512_args = [cflags, '-mavx512f', '-mavx512bw'] > if cc.has_argument('-march=skylake-avx512') > -- > 2.17.1
> -----Original Message----- > From: Tal Shnaiderman <talshn@nvidia.com> > Sent: Wednesday, January 27, 2021 1:04 AM > To: Rong, Leyi <leyi.rong@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; > Kadam, Pallavi <pallavi.kadam@intel.com>; Yigit, Ferruh > <ferruh.yigit@intel.com>; Menon, Ranjit <ranjit.menon@intel.com>; Xing, Beilei > <beilei.xing@intel.com> > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] net/i40e: fix mingw build error > > > Subject: [dpdk-dev] [PATCH] net/i40e: fix mingw build error > > > > External email: Use caution opening links or attachments > > > > > > Disable i40e avx512 code path for windows build to avoid the mingw > > build error. > > > > Fixes: e6a6a138919f ("net/i40e: add AVX512 vector path") > > > > Signed-off-by: Leyi Rong <leyi.rong@intel.com> > > --- > > config/x86/cross-mingw | 3 +++ > > drivers/net/i40e/meson.build | 2 +- > > 2 files changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/config/x86/cross-mingw b/config/x86/cross-mingw index > > 4c15a7fa2e..48a82b457e 100644 > > --- a/config/x86/cross-mingw > > +++ b/config/x86/cross-mingw > > @@ -11,3 +11,6 @@ system = 'windows' > > cpu_family = 'x86_64' > > cpu = 'native' > > endian = 'little' > > + > > +[properties] > > +c_args = '-mno-avx512f' > > Should be in a different patch since it effects the whole project. > Sure, will be split in v2. > > diff --git a/drivers/net/i40e/meson.build > > b/drivers/net/i40e/meson.build index c0acdf4fd4..c9a1a50407 100644 > > --- a/drivers/net/i40e/meson.build > > +++ b/drivers/net/i40e/meson.build > > @@ -54,7 +54,7 @@ if arch_subdir == 'x86' > > cc.has_argument('-mavx512f') and > > cc.has_argument('-mavx512bw')) > > > > - if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true > > + if not is_windows and (i40e_avx512_cpu_support == true or > > + i40e_avx512_cc_support == true) > > DmitryK already mentioned it previously; you only need to disabled MinGW64 > since clang isn't seeing those errors. > Yes, will support the case when clang is enable.
This patchset fix mingw build error when avx512 is introduced. Leyi Rong (2): config: disable avx512 on mingw cross build net/i40e: fix mingw build error config/x86/cross-mingw | 3 +++ drivers/net/i40e/meson.build | 26 ++++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) -- 2.17.1
Disable avx512 when on mingw cross build, as .seh_savexmm build error reports if avx512 is enabled. Signed-off-by: Leyi Rong <leyi.rong@intel.com> --- config/x86/cross-mingw | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/x86/cross-mingw b/config/x86/cross-mingw index 4c15a7fa2e..48a82b457e 100644 --- a/config/x86/cross-mingw +++ b/config/x86/cross-mingw @@ -11,3 +11,6 @@ system = 'windows' cpu_family = 'x86_64' cpu = 'native' endian = 'little' + +[properties] +c_args = '-mno-avx512f' -- 2.17.1
Disable i40e avx512 code path for windows build to avoid the mingw build error. Fixes: e6a6a138919f ("net/i40e: add AVX512 vector path") Signed-off-by: Leyi Rong <leyi.rong@intel.com> --- drivers/net/i40e/meson.build | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build index c0acdf4fd4..34c9dfa681 100644 --- a/drivers/net/i40e/meson.build +++ b/drivers/net/i40e/meson.build @@ -54,19 +54,21 @@ if arch_subdir == 'x86' cc.has_argument('-mavx512f') and cc.has_argument('-mavx512bw')) - if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true - cflags += ['-DCC_AVX512_SUPPORT'] - avx512_args = [cflags, '-mavx512f', '-mavx512bw'] - if cc.has_argument('-march=skylake-avx512') - avx512_args += '-march=skylake-avx512' + if not is_windows or cc.get_id() == 'clang' + if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true + cflags += ['-DCC_AVX512_SUPPORT'] + avx512_args = [cflags, '-mavx512f', '-mavx512bw'] + if cc.has_argument('-march=skylake-avx512') + avx512_args += '-march=skylake-avx512' + endif + i40e_avx512_lib = static_library('i40e_avx512_lib', + 'i40e_rxtx_vec_avx512.c', + dependencies: [static_rte_ethdev, + static_rte_kvargs, static_rte_hash], + include_directories: includes, + c_args: avx512_args) + objs += i40e_avx512_lib.extract_objects('i40e_rxtx_vec_avx512.c') endif - i40e_avx512_lib = static_library('i40e_avx512_lib', - 'i40e_rxtx_vec_avx512.c', - dependencies: [static_rte_ethdev, - static_rte_kvargs, static_rte_hash], - include_directories: includes, - c_args: avx512_args) - objs += i40e_avx512_lib.extract_objects('i40e_rxtx_vec_avx512.c') endif elif arch_subdir == 'ppc' sources += files('i40e_rxtx_vec_altivec.c') -- 2.17.1
On Wed, Jan 27, 2021 at 04:47:45PM +0800, Leyi Rong wrote:
> Disable i40e avx512 code path for windows build to
> avoid the mingw build error.
>
> Fixes: e6a6a138919f ("net/i40e: add AVX512 vector path")
>
> Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> ---
> drivers/net/i40e/meson.build | 26 ++++++++++++++------------
> 1 file changed, 14 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build
> index c0acdf4fd4..34c9dfa681 100644
> --- a/drivers/net/i40e/meson.build
> +++ b/drivers/net/i40e/meson.build
> @@ -54,19 +54,21 @@ if arch_subdir == 'x86'
> cc.has_argument('-mavx512f') and
> cc.has_argument('-mavx512bw'))
>
> - if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true
> - cflags += ['-DCC_AVX512_SUPPORT']
> - avx512_args = [cflags, '-mavx512f', '-mavx512bw']
> - if cc.has_argument('-march=skylake-avx512')
> - avx512_args += '-march=skylake-avx512'
> + if not is_windows or cc.get_id() == 'clang'
> + if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true
Rather than changing this whole block to indent it further following the
new condition check, I think a simpler fix might be to insert:
if is_windows and cc.get_id() != 'clang'
i40e_avx512_cc_support = false
endif
just after the initial assignment to i40e_avx512_cc_support. [Alternatively,
you can include those conditions in the assignment itself, but it's
probably more readable done separately as I show above.]
/Bruce
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Wednesday, January 27, 2021 6:41 PM
> To: Rong, Leyi <leyi.rong@intel.com>
> Cc: talshn@nvidia.com; Zhang, Qi Z <qi.z.zhang@intel.com>; Kadam, Pallavi
> <pallavi.kadam@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>; Menon,
> Ranjit <ranjit.menon@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 2/2] net/i40e: fix mingw build error
>
> On Wed, Jan 27, 2021 at 04:47:45PM +0800, Leyi Rong wrote:
> > Disable i40e avx512 code path for windows build to avoid the mingw
> > build error.
> >
> > Fixes: e6a6a138919f ("net/i40e: add AVX512 vector path")
> >
> > Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> > ---
> > drivers/net/i40e/meson.build | 26 ++++++++++++++------------
> > 1 file changed, 14 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/net/i40e/meson.build
> > b/drivers/net/i40e/meson.build index c0acdf4fd4..34c9dfa681 100644
> > --- a/drivers/net/i40e/meson.build
> > +++ b/drivers/net/i40e/meson.build
> > @@ -54,19 +54,21 @@ if arch_subdir == 'x86'
> > cc.has_argument('-mavx512f') and
> > cc.has_argument('-mavx512bw'))
> >
> > - if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true
> > - cflags += ['-DCC_AVX512_SUPPORT']
> > - avx512_args = [cflags, '-mavx512f', '-mavx512bw']
> > - if cc.has_argument('-march=skylake-avx512')
> > - avx512_args += '-march=skylake-avx512'
> > + if not is_windows or cc.get_id() == 'clang'
> > + if i40e_avx512_cpu_support == true or i40e_avx512_cc_support
> ==
> > +true
>
> Rather than changing this whole block to indent it further following the new
> condition check, I think a simpler fix might be to insert:
>
> if is_windows and cc.get_id() != 'clang'
> i40e_avx512_cc_support = false
> endif
>
> just after the initial assignment to i40e_avx512_cc_support. [Alternatively, you
> can include those conditions in the assignment itself, but it's probably more
> readable done separately as I show above.]
>
> /Bruce
Agree, seems clear to put the logic block separately. Thanks~
This patchset fix mingw build error when avx512 is introduced. --- v2: - Set i40e_avx512_cc_support to false to avoid the build error under windows with mingw. Leyi Rong (2): config: disable avx512 on mingw cross build net/i40e: fix mingw build error config/x86/cross-mingw | 3 +++ drivers/net/i40e/meson.build | 4 ++++ 2 files changed, 7 insertions(+) -- 2.17.1
Disable avx512 when on mingw cross build, as .seh_savexmm build error reports if avx512 is enabled. Signed-off-by: Leyi Rong <leyi.rong@intel.com> --- config/x86/cross-mingw | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/x86/cross-mingw b/config/x86/cross-mingw index 4c15a7fa2e..48a82b457e 100644 --- a/config/x86/cross-mingw +++ b/config/x86/cross-mingw @@ -11,3 +11,6 @@ system = 'windows' cpu_family = 'x86_64' cpu = 'native' endian = 'little' + +[properties] +c_args = '-mno-avx512f' -- 2.17.1
Disable i40e avx512 code path for windows build to avoid the mingw build error. Signed-off-by: Leyi Rong <leyi.rong@intel.com> --- drivers/net/i40e/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build index c0acdf4fd4..f5fc5a17e0 100644 --- a/drivers/net/i40e/meson.build +++ b/drivers/net/i40e/meson.build @@ -54,6 +54,10 @@ if arch_subdir == 'x86' cc.has_argument('-mavx512f') and cc.has_argument('-mavx512bw')) + if is_windows and cc.get_id() != 'clang' + i40e_avx512_cc_support = false + endif + if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true cflags += ['-DCC_AVX512_SUPPORT'] avx512_args = [cflags, '-mavx512f', '-mavx512bw'] -- 2.17.1
On 1/27/2021 6:27 AM, Leyi Rong wrote:
> This patchset fix mingw build error when avx512 is introduced.
>
> ---
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
On Wed, Jan 27, 2021 at 3:47 PM Leyi Rong <leyi.rong@intel.com> wrote:
>
> This patchset fix mingw build error when avx512 is introduced.
>
> ---
> v2:
> - Set i40e_avx512_cc_support to false to avoid the build error under
> windows with mingw.
>
> Leyi Rong (2):
> config: disable avx512 on mingw cross build
> net/i40e: fix mingw build error
>
> config/x86/cross-mingw | 3 +++
> drivers/net/i40e/meson.build | 4 ++++
> 2 files changed, 7 insertions(+)
LGTM with fc32 mingw.
Tested-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
28/01/2021 13:28, David Marchand:
> On Wed, Jan 27, 2021 at 3:47 PM Leyi Rong <leyi.rong@intel.com> wrote:
> >
> > This patchset fix mingw build error when avx512 is introduced.
> >
> > ---
> > v2:
> > - Set i40e_avx512_cc_support to false to avoid the build error under
> > windows with mingw.
> >
> > Leyi Rong (2):
> > config: disable avx512 on mingw cross build
> > net/i40e: fix mingw build error
> >
> > config/x86/cross-mingw | 3 +++
> > drivers/net/i40e/meson.build | 4 ++++
> > 2 files changed, 7 insertions(+)
>
> LGTM with fc32 mingw.
> Tested-by: David Marchand <david.marchand@redhat.com>
Applied, thanks.
Dmitry found a lighter alternative option to be tested and discussed.
On Thu, Jan 28, 2021 at 10:27 PM Thomas Monjalon <thomas@monjalon.net> wrote: > > 28/01/2021 13:28, David Marchand: > > On Wed, Jan 27, 2021 at 3:47 PM Leyi Rong <leyi.rong@intel.com> wrote: > > > > > > This patchset fix mingw build error when avx512 is introduced. > > > > > > --- > > > v2: > > > - Set i40e_avx512_cc_support to false to avoid the build error under > > > windows with mingw. > > > > > > Leyi Rong (2): > > > config: disable avx512 on mingw cross build > > > net/i40e: fix mingw build error > > > > > > config/x86/cross-mingw | 3 +++ > > > drivers/net/i40e/meson.build | 4 ++++ > > > 2 files changed, 7 insertions(+) > > > > LGTM with fc32 mingw. > > Tested-by: David Marchand <david.marchand@redhat.com> > > Applied, thanks. > > Dmitry found a lighter alternative option to be tested and discussed. We still have build failures at UNH for Windows, on the rc2 tag: http://mails.dpdk.org/archives/test-report/2021-February/177464.html Is this issue being looked at? -- David Marchand
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Tuesday, February 2, 2021 4:37 PM
> To: Rong, Leyi <leyi.rong@intel.com>; Dmitry Kozlyuk
> <dmitry.kozliuk@gmail.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>; Richardson, Bruce
> <bruce.richardson@intel.com>; Tal Shnaiderman <talshn@nvidia.com>; Zhang,
> Qi Z <qi.z.zhang@intel.com>; Kadam, Pallavi <pallavi.kadam@intel.com>; Yigit,
> Ferruh <ferruh.yigit@intel.com>; Menon, Ranjit <ranjit.menon@intel.com>; Xing,
> Beilei <beilei.xing@intel.com>; dev <dev@dpdk.org>; Aaron Conole
> <aconole@redhat.com>; ci@dpdk.org; dpdklab <dpdklab@iol.unh.edu>
> Subject: Re: [dpdk-dev] [PATCH v3 0/2] fix mingw build error
>
> On Thu, Jan 28, 2021 at 10:27 PM Thomas Monjalon <thomas@monjalon.net>
> wrote:
> >
> > 28/01/2021 13:28, David Marchand:
> > > On Wed, Jan 27, 2021 at 3:47 PM Leyi Rong <leyi.rong@intel.com> wrote:
> > > >
> > > > This patchset fix mingw build error when avx512 is introduced.
> > > >
> > > > ---
> > > > v2:
> > > > - Set i40e_avx512_cc_support to false to avoid the build error under
> > > > windows with mingw.
> > > >
> > > > Leyi Rong (2):
> > > > config: disable avx512 on mingw cross build
> > > > net/i40e: fix mingw build error
> > > >
> > > > config/x86/cross-mingw | 3 +++
> > > > drivers/net/i40e/meson.build | 4 ++++
> > > > 2 files changed, 7 insertions(+)
> > >
> > > LGTM with fc32 mingw.
> > > Tested-by: David Marchand <david.marchand@redhat.com>
> >
> > Applied, thanks.
> >
> > Dmitry found a lighter alternative option to be tested and discussed.
>
> We still have build failures at UNH for Windows, on the rc2 tag:
> http://mails.dpdk.org/archives/test-report/2021-February/177464.html
>
> Is this issue being looked at?
>
>
> --
> David Marchand
Hi David,
Seems the issue still exist on the platform which CPU has AVX512 capability, I think previous patch is not verified to cover this case.
Will send hotfix patch for this.