From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E8040A046B for ; Thu, 27 Jun 2019 15:22:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CC16D2C30; Thu, 27 Jun 2019 15:22:26 +0200 (CEST) Received: from mail-ua1-f68.google.com (mail-ua1-f68.google.com [209.85.222.68]) by dpdk.org (Postfix) with ESMTP id 38C4B2BF7 for ; Thu, 27 Jun 2019 15:22:26 +0200 (CEST) Received: by mail-ua1-f68.google.com with SMTP id j21so832583uap.2 for ; Thu, 27 Jun 2019 06:22:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U6B/Qw8ckzy5UO0Bkfzt+6CA4sW495p0dXY4dRFTwgg=; b=Y4XXb3dloCgi7JnAlUj/FTKlrYvOrjKlZGblArglhk8Z/CCmLRP3wprNgTAsdyca02 VLBjSPnhc16bxEAWUG3Vb0tIsLyU0I1gZcFVXR19yxk0XYicojLSVgoEuSRtHfO1VcSO 56C/FHkXUWrcy+0FymskD64DtJ0DFY/7d0g49WLGQWqjPP7kqoBh2X+Xg0IyKEA9kxbg CpjmYOsSKPIu8W2n3kyyF/3VmEqS0YU3y4HVyomD3h+2IVLQDiXrG3ahNE3Do/+98UVy y8FMBlvLCpbp+4uU+IP6JIHl6LkC6Etxh/cY53L63h9eHPw7YgJVi4n+gB/ISdzshjK5 cllg== X-Gm-Message-State: APjAAAWDaaLADMW5JWhz9cG4khPb1/RheXAYVLiENWcoyln/8N7CaowL GAePMZZL0/cpKc46Pw0fHJAiGyxnQGvUBQGjNe58Vw== X-Google-Smtp-Source: APXvYqzgDFaJqE3Qwr/hKj7DnGeEow8l+93JRhYcdPspKOnFE0U+e6ffG2SAAlFcHZM+eF7jsX1G+Ftp9rRpaHXnmQ4= X-Received: by 2002:ab0:6198:: with SMTP id h24mr2341001uan.41.1561641745602; Thu, 27 Jun 2019 06:22:25 -0700 (PDT) MIME-Version: 1.0 References: <20190529154132.49955-1-bruce.richardson@intel.com> <20190529154132.49955-4-bruce.richardson@intel.com> In-Reply-To: <20190529154132.49955-4-bruce.richardson@intel.com> From: David Marchand Date: Thu, 27 Jun 2019 15:22:14 +0200 Message-ID: To: Bruce Richardson Cc: dev Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 3/4] eal: allow checking CPU flags by name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, May 29, 2019 at 5:42 PM Bruce Richardson wrote: > Rather than using enum values for CPU flags, which means the symbols don't > exist on other architectures, provide a flag lookup by name, allowing us to > unconditionally check for a CPU flag. > Did you consider passing a string for the CPU architecture rather than an enum? It would have to be compared to RTE_ARCH in rte_cpu_get_flagname_enabled. Or to accomodate with x86_64/i686, this could be a cpu arch family. This avoids adding a new C type that seems quite limited wrt its uses. -- David Marchand