From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF188A0093 for ; Fri, 11 Mar 2022 01:01:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AF9A40E78; Fri, 11 Mar 2022 01:01:26 +0100 (CET) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by mails.dpdk.org (Postfix) with ESMTP id 5A9C340042 for ; Fri, 11 Mar 2022 01:01:25 +0100 (CET) Received: by mail-ej1-f52.google.com with SMTP id p15so15650204ejc.7 for ; Thu, 10 Mar 2022 16:01:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=08FWr1NG7GnN9tHS/bgUR39uyjeEPO0FpKSqcsj1kf0=; b=cunaBGx5ewlfonjoktfZVvhbYQFcVo1OJC79RyYbImWo33Vu8fSj0JfOpOhU6+qTMf mF4KySMghZiDpOHc2JM11pdbOH0OOgPrPk/SSWHlR5aXv+beczeDJv8hg2j0U3+WBjDr xrl2ie7jvde9kEKWTJuaDWqSIlTigmwcdrjLzOJuwdNntMMimPOTXGcMXJXJGYVS/sst NIgeNCohIDjA40iU+kzFzZxJzN6UbnDYZwAvWJicFG0PbI9rb1ooiNPxNE7D5+cX+7HB DsKR1CI481f4yqZ8ob8ZcR469XUgdM+0/LIdc4s2kQIegYC4fbRBMZqL0m5FDI914tLd bivQ== X-Gm-Message-State: AOAM532v1kr3JW9fpD1De8HPC+g1om7hyUxkhoaYHd/YoeGV6m3B7D1R pV5GlZxhnRD9aEg4YEu63HHqFDSBrOiJ7xHGMhk= X-Google-Smtp-Source: ABdhPJx+cHRwQlhMi0+TvZtNd1J17Bv2qiE2gSFiDVP+co1PanHJmq6F203j6xRzMvH3HbuFkzJqjXzhzn6xPiSmWAk= X-Received: by 2002:a17:907:2d29:b0:6db:2b1f:333a with SMTP id gs41-20020a1709072d2900b006db2b1f333amr6423403ejc.704.1646956884976; Thu, 10 Mar 2022 16:01:24 -0800 (PST) MIME-Version: 1.0 References: <165CAE28-2A3E-4960-8E57-2EB9A19024DB@akamai.com> <34563BA1-3187-4496-8392-9F5FFB006300@akamai.com> In-Reply-To: <34563BA1-3187-4496-8392-9F5FFB006300@akamai.com> From: Dan Gora Date: Thu, 10 Mar 2022 21:00:48 -0300 Message-ID: Subject: Re: meson options - build vs target machine cpuflags question To: "Sanford, Robert" Cc: "users@dpdk.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Thu, Mar 10, 2022 at 8:39 PM Sanford, Robert 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