DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [RFC] eal: rename state values in rte_lcore_state
Date: Wed, 27 Mar 2019 01:42:48 +0100	[thread overview]
Message-ID: <2813435.odFC1KYpGd@xps> (raw)
In-Reply-To: <20190326192556.19934-1-stephen@networkplumber.org>

26/03/2019 20:25, Stephen Hemminger:
> 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 "LCORE_" to the enum values, and
> make them grammatically consistent.
> 
[...]
>  enum rte_lcore_state_t {
> -	WAIT,       /**< waiting a new command */
> -	RUNNING,    /**< executing command */
> -	FINISHED,   /**< command executed */
> +	LCORE_WAITING,    /**< waiting a new command */
> +	LCORE_RUNNING,    /**< executing command */
> +	LCORE_FINISHED,   /**< command executed */
>  };

We have some old namespace issues in DPDK.
While improving the public namespace, please fix it definitely
by prefixing with "RTE_".

PS: I would prefer DPDK_ prefix but that's not what is used currently.

  parent reply	other threads:[~2019-03-27  0:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26 19:25 Stephen Hemminger
2019-03-26 19:25 ` Stephen Hemminger
2019-03-27  0:42 ` Thomas Monjalon [this message]
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
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=2813435.odFC1KYpGd@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.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).