From: Dan Gora <dg@adax.com>
To: "Sanford, Robert" <rsanford@akamai.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: meson options - build vs target machine cpuflags question
Date: Thu, 10 Mar 2022 21:00:48 -0300 [thread overview]
Message-ID: <CAGyogRaP45yg-v6hR-FD5RbaxNaO4nXGo7yhdqmC7v3CyfP+sA@mail.gmail.com> (raw)
In-Reply-To: <34563BA1-3187-4496-8392-9F5FFB006300@akamai.com>
On Thu, Mar 10, 2022 at 8:39 PM Sanford, Robert <rsanford@akamai.com> wrote:
>
> Hi Dan,
> Thanks for the response. It is a lot of work and patience to get a change accepted. I admire all the guys who do it on a regular basis.
>
> My problem turns out to be twofold: 1) Build machine has a CPU flag that the target does not have, and I was building "native".
> 2) Since I was building native, I was enabling RDSEED instructions even though the CPU doesn't support them. Fortunately, getentropy(3) works in our env.
>
> I found the answer, by digging into the meson.build files, especially in config/ and config/x86/, and the resulting files created in the build dir.
> Passing -Dplatform=haswell to meson did almost nothing AFAICS, still "native".
> When I switch to -Dmachine=haswell, it has the desired effect on both build.ninja (generating -march=haswell for gcc)
> and rte_build_config.h (disabling RDSEED).
yeah I recall that the meson makefiles had a couple of changes that
needed to be done. The patch worked by compiling the code with the
RDSEED instructions regardless of whether or not the build platform
supported them, but then checking the CPU flags at run time to see if
it could be accessed or not. But that should work too, you just can't
access RDSEED on platforms which support it, but whatever..
getentropy() will work.
thanks
dan
next prev parent reply other threads:[~2022-03-11 0:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 14:46 Sanford, Robert
2022-03-10 22:54 ` Dan Gora
2022-03-10 22:58 ` Dan Gora
2022-03-10 23:39 ` Sanford, Robert
2022-03-11 0:00 ` Dan Gora [this message]
2022-03-11 1:18 ` Stephen Hemminger
2022-03-11 2:45 ` Dan Gora
2022-03-11 3:01 ` Stephen Hemminger
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=CAGyogRaP45yg-v6hR-FD5RbaxNaO4nXGo7yhdqmC7v3CyfP+sA@mail.gmail.com \
--to=dg@adax.com \
--cc=rsanford@akamai.com \
--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).