[meta-intel] [meta-dpdk][PATCH] dpdk: workaround sse mismatch error
Anuj Mittal
anuj.mittal at intel.com
Wed Oct 10 22:21:00 PDT 2018
Hi Hongxu
On 10/11/2018 11:01 AM, Hongxu Jia wrote:
> On 2018年10月11日 08:21, Anuj Mittal wrote:
>> Is it possible that the value of -march is also being defined from
>> somewhere within dpdk leading to a mismatch?
>
> Hi Anuj,
>
> I think so, since var-DPDK_TARGET_MACHINE is `default' which mismatch
> with `-march=**' in var-HOST_CC_ARCH
>
> For qemux86-64, while var-DPDK_TARGET_MACHINE is `default', its
> `-march=corei7',
> it mismatch with `-march=core2' in var-HOST_CC_ARCH
>
> [grep corei -rn mk]
> mk/machine/native/rte.vars.mk:35:# so, set the compilation target to be
> a corei7, minimum target with SSE4.2.
> mk/machine/native/rte.vars.mk:38: MACHINE_CFLAGS = -march=corei7
> mk/machine/default/rte.vars.mk:30:MACHINE_CFLAGS += -march=corei7
> mk/machine/wsm/rte.vars.mk:30:MACHINE_CFLAGS = -march=corei7 -maes -mpclmul
> mk/machine/snb/rte.vars.mk:30:MACHINE_CFLAGS = -march=corei7-avx
> mk/machine/nhm/rte.vars.mk:30:MACHINE_CFLAGS = -march=corei
> [grep corei -rn mk]
>
> For default, its MACHINE_CFLAGS is ` -march=corei7', and set
> `DPDK_TARGET_MACHINE = 'corei5''
> does not work, no mk/machine/corei5/rte.vars.mk to support it
>
> I think this fix is not appropriate, please drop it. My suggestion is remove
> var-HOST_CC_ARCH from do_compile, V2 incoming
>
I think we shouldn't be building with -march=corei7 (which is what it
will do if you remove HOST_CC_ARCH) if the underlying hardware doesn't
support it. It probably wouldn't even work since default value is
core2duo for qemu in tune-core2.inc which doesn't support SSE 4.2 (which
is a requirement for dpdk).
In my opinion, we should keep HOST_CC_ARCH and anyone using dpdk should
make sure that they define COMPATIBLE_MACHINE and DPDK_TARGET_MACHINE
properly depending on the arch that they are building for. Does that
make sense?
Thanks,
Anuj
More information about the meta-intel
mailing list