DPDK usage discussions
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: Alex Kiselev <alex@therouter.net>, "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] build dpdk for a cpu that doesn't support avx
Date: Thu, 21 Feb 2019 16:02:46 +0000	[thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA6757E5810@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <872839432.20190221183254@therouter.net>

> -----Original Message-----
> From: users [mailto:users-bounces@dpdk.org] On Behalf Of Alex Kiselev
> Sent: Thursday, February 21, 2019 3:33 PM
> To: users@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

  reply	other threads:[~2019-02-21 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21 14:47 Alex Kiselev
2019-02-21 15:32 ` Alex Kiselev
2019-02-21 16:02   ` Van Haaren, Harry [this message]
2019-02-21 16:32     ` Alex Kiselev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E923DB57A917B54B9182A2E928D00FA6757E5810@IRSMSX102.ger.corp.intel.com \
    --to=harry.van.haaren@intel.com \
    --cc=alex@therouter.net \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).