From: David Marchand <david.marchand@redhat.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 3/4] eal: allow checking CPU flags by name
Date: Fri, 28 Jun 2019 15:34:10 +0200 [thread overview]
Message-ID: <CAJFAV8z0Dv-mYuph53y+_dccVMxWXtAjp03dWpzfOaybag1CcQ@mail.gmail.com> (raw)
In-Reply-To: <20190628124035.GA347@bricha3-MOBL.ger.corp.intel.com>
On Fri, Jun 28, 2019 at 2:40 PM Bruce Richardson <bruce.richardson@intel.com>
wrote:
> On Thu, Jun 27, 2019 at 03:22:14PM +0200, David Marchand wrote:
> > On Wed, May 29, 2019 at 5:42 PM Bruce Richardson
> > <[1]bruce.richardson@intel.com> 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
> >
>
> I'm not sure I really see the value in having string names for the
> architecture values, I think it would be a lot more clunky to manage rather
> than having an enum value. The key difference vs the flags is that the
> flags are only valid per-architecture while the architecture defines can be
> globally valid, and secondly there is a finite, and small, number of
> architectures compared to the number of flags supported.
>
> If you feel strongly about it I can investigate it, but I'm not sure I see
> the value in doing so right now if the only benefit is avoiding the enum.
>
I suppose we won't have too much trouble handling ABI breakage (thinking
about when we will remove x86 support).
Ok, let's go with this.
--
David Marchand
next prev parent reply other threads:[~2019-06-28 13:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 15:41 [dpdk-dev] [PATCH 0/4] Enhance CPU flag support Bruce Richardson
2019-05-29 15:41 ` [dpdk-dev] [PATCH 1/4] build: fix quoting on RTE_ARCH string value Bruce Richardson
2019-05-29 15:53 ` Luca Boccassi
2019-05-29 15:41 ` [dpdk-dev] [PATCH 2/4] config/arm: fix missing define for arm platforms Bruce Richardson
2019-05-29 15:41 ` [dpdk-dev] [PATCH 3/4] eal: allow checking CPU flags by name Bruce Richardson
2019-06-27 13:22 ` David Marchand
2019-06-28 12:40 ` Bruce Richardson
2019-06-28 13:34 ` David Marchand [this message]
2019-05-29 15:41 ` [dpdk-dev] [PATCH 4/4] net: replace ifdefs with runtime branches Bruce Richardson
2019-07-01 19:30 ` Thomas Monjalon
2019-07-01 20:41 ` Bruce Richardson
2019-07-04 20:20 ` Thomas Monjalon
2019-07-08 17:24 ` David Christensen
2019-06-27 12:39 ` [dpdk-dev] [PATCH 0/4] Enhance CPU flag support Ananyev, Konstantin
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=CAJFAV8z0Dv-mYuph53y+_dccVMxWXtAjp03dWpzfOaybag1CcQ@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=dev@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).