[dpdk-users] build dpdk for a cpu that doesn't support avx

Alex Kiselev alex at therouter.net
Thu Feb 21 17:32:17 CET 2019


>> -----Original Message-----
>> From: users [mailto:users-bounces at dpdk.org] On Behalf Of Alex Kiselev
>> Sent: Thursday, February 21, 2019 3:33 PM
>> To: users at dpdk.org
>> Subject: Re: [dpdk-users] build dpdk for a cpu that doesn't support avx

>> It looks like I've found a way:

>> I edited $RTE_SDK/config/defconfig_x86_64-native-linuxapp-gcc
>>   CONFIG_RTE_MACHINE="x86-64"

>> and then I used
>>   make EXTRA_CFLAGS="-march=x86-64 -mpopcnt -mmmx -msse -msse2 -msse3 -mssse3
>> -msse4.1 -msse4.2 -mfpmath=sse -mpopcnt"

>> The application has started successfully.
>> But I am wondering, maybe I've missed something and there are potential bugs
>> in this way?

>> > Hi.

>> > Is it possible to build DPDK application  on a machine that do have AVX
>> support
>> > for use at another machine that doesn't have AVX feature?

>> > Thanks.


> Using -march to manually tune should work fine, just be aware of
> mistakes made; this is an error prone method..

> As per the GCC docs, you can target specific CPU families, and the optimal flags will be selected:
> https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html

> Example:  -march=goldmont-plus

> With make, EXTRA_CFLAGS="-march=NAME-HERE" should work
> With Meson, cd <build_dir> && meson configure -Dc_args="-march=NAME-HERE"

> I guess there's a prettier method for meson, but the above works here :)

> Hope that helps, -Harry

Yes, it helped. Thank you. 
I've switched to using EXTRA_CFLAGS="-march=westmere"

--
Alex



More information about the users mailing list