From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [RFC] eal: rename state values in rte_lcore_state Date: Wed, 27 Mar 2019 01:42:48 +0100 Message-ID: <2813435.odFC1KYpGd@xps> References: <20190326192556.19934-1-stephen@networkplumber.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Stephen Hemminger Return-path: Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 171A11B426 for ; Wed, 27 Mar 2019 01:42:53 +0100 (CET) In-Reply-To: <20190326192556.19934-1-stephen@networkplumber.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.