From: Stephen Hemminger <stephen@networkplumber.org>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] eal: rename state values in rte_lcore_state
Date: Tue, 2 Apr 2019 14:07:01 -0700 [thread overview]
Message-ID: <20190402140701.058d983c@shemminger-XPS-13-9360> (raw)
In-Reply-To: <CAJFAV8zER85evBdNEk7eDACsc6k-goiR_+TLLzUAmdgRE5hTXQ@mail.gmail.com>
On Tue, 2 Apr 2019 23:03:06 +0200
David Marchand <david.marchand@redhat.com> wrote:
> On Tue, Apr 2, 2019 at 10:48 PM Stephen Hemminger <
> stephen@networkplumber.org> wrote:
>
> > On Tue, 2 Apr 2019 22:15:40 +0200
> > David Marchand <david.marchand@redhat.com> wrote:
> >
> > > On Tue, Apr 2, 2019 at 5:57 PM Stephen Hemminger <
> > stephen@networkplumber.org>
> > > wrote:
> > >
> > > > C language does not really treat enum's as first class symbols.
> > > > The values in an enum live in a global namespace. That means if
> > > > DPDK defines "RUNNING" it can't be used by another enum in an
> > > > application using DPDK.
> > > >
> > > > To solve this add a prefix "RTE_LCORE_" to the enum values, and
> > > > make them grammatically consistent.
> > > >
> > >
> > > Well, I understand this is not clean, but this patch breaks the API.
> >
> > The lcore state was marked as internal in the header file, code that
> > ignores that is going to have problems. The values are the same.
> >
> > We could defer this to 19.11 (next LTS) since it is cosmetic.
> >
>
> We must announce it before changing.
I disagree, if an API is marked as internal it can be changed at any
time (as long as ABI is maintained).
>
>
> At that time, I am willing to do more work to make lcore_config hidden;
> > ie no inline's to access it.
> >
>
> Ah I was looking at that, to see if we could at least shoot the direct
> accesses by calling the existing API.
> I can see we are missing one wrapper for the cpu id...
>
> And there are quite some odds things in with cpu affinity in dpaa:
> drivers/bus/dpaa/dpaa_bus.c: cpu = lcore_config[lcore].core_id;
> drivers/bus/dpaa/dpaa_bus.c:
> &lcore_config[lcore].cpuset);
> drivers/bus/fslmc/portal/dpaa2_hw_dpio.c: if
> (CPU_ISSET(i, &lcore_config[lcore_id].cpuset)) {
>
>
Drivers have no API/ABI restriction, it is only user code.
next prev parent reply other threads:[~2019-04-02 21:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 19:25 [dpdk-dev] [RFC] " Stephen Hemminger
2019-03-26 19:25 ` Stephen Hemminger
2019-03-27 0:42 ` Thomas Monjalon
2019-03-27 0:42 ` Thomas Monjalon
2019-04-02 15:57 ` [dpdk-dev] [PATCH v2] " Stephen Hemminger
2019-04-02 15:57 ` Stephen Hemminger
2019-04-02 20:15 ` David Marchand
2019-04-02 20:15 ` David Marchand
2019-04-02 20:48 ` Stephen Hemminger
2019-04-02 20:48 ` Stephen Hemminger
2019-04-02 21:03 ` David Marchand
2019-04-02 21:03 ` David Marchand
2019-04-02 21:07 ` Stephen Hemminger [this message]
2019-04-02 21:07 ` Stephen Hemminger
2019-04-02 21:21 ` David Marchand
2019-04-02 21:21 ` David Marchand
2019-04-02 20:53 ` [dpdk-dev] [PATCH v3] " Stephen Hemminger
2019-04-02 20:53 ` Stephen Hemminger
2019-04-03 11:59 ` David Marchand
2019-04-03 11:59 ` David Marchand
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=20190402140701.058d983c@shemminger-XPS-13-9360 \
--to=stephen@networkplumber.org \
--cc=david.marchand@redhat.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).