patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Xiaoyun Li <xiaoyun.li@intel.com>
Cc: dev@dpdk.org, helin.zhang@intel.com, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] mk: fix compiling error for atom target
Date: Thu, 7 Sep 2017 09:56:40 +0100	[thread overview]
Message-ID: <20170907085640.GA24764@bricha3-MOBL3.ger.corp.intel.com> (raw)
In-Reply-To: <1504773317-2042-1-git-send-email-xiaoyun.li@intel.com>

On Thu, Sep 07, 2017 at 04:35:17PM +0800, Xiaoyun Li wrote:
> GCC thinks target atom doesn't support SSE4.2 and SSE4 is now part of
> minimum requirements for DPDK on x86. So there are compiling errors when
> cross-compiling for target atom. And in fact, the atom supports SSE4 now.
> This patch fixes this issue.
> 
> Fixes: 5ea4d4688dce ("net/ixgbe: remove fallback code for x86 non-SSE4")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>

The -march=atom flag is for older atom CPUs, and is no longer advertised
by gcc, since all -march flags now correspond to the actual core
microarchitecture used. [man gcc on Fedora 26, no longer lists atom as a
valid march value, though it's probably still accepted for backward
compatibility]. The direct replacement for atom is "bonnell", which does
not have SSE4.2 support, so we should not use. What we do support is
later atoms, so the architecture targets for atom should be
"-march=silvermont". This automatically includes sse4 support so no
additional flags needed.

Note: I previously had this discussion with Neil on-list, but forgot to
do the follow-up work agreed on. See: 
https://www.mail-archive.com/dev@dpdk.org/msg72629.html
The agreed plan was to remove atom as a target for DPDK builds and add a
"silvermont" replacement instead. If you have time, perhaps you could
look at doing that instead of this fix?

/Bruce

> ---
>  mk/machine/atm/rte.vars.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mk/machine/atm/rte.vars.mk b/mk/machine/atm/rte.vars.mk
> index cfed110..a6899d9 100644
> --- a/mk/machine/atm/rte.vars.mk
> +++ b/mk/machine/atm/rte.vars.mk
> @@ -56,3 +56,5 @@
>  # CPU_ASFLAGS =
>  
>  MACHINE_CFLAGS = -march=atom
> +
> +MACHINE_CFLAGS += -msse4.2
> -- 
> 2.7.4
> 

  reply	other threads:[~2017-09-07  8:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07  8:35 Xiaoyun Li
2017-09-07  8:56 ` Bruce Richardson [this message]
2017-09-07  9:31   ` Li, Xiaoyun
2017-09-07 10:09     ` Bruce Richardson

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=20170907085640.GA24764@bricha3-MOBL3.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=xiaoyun.li@intel.com \
    /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).