From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 8F053A05D3 for ; Wed, 27 Mar 2019 01:42:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B5E31B42E; Wed, 27 Mar 2019 01:42:54 +0100 (CET) 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) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D64364782; Tue, 26 Mar 2019 20:42:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 26 Mar 2019 20:42:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=XNdNQsJgIndpidLjFsHlbqbcGswEnRl8nFAK2duGZzk=; b=EZ9yeAOX+LKR iWtw8SmNs7UmbwmYE+8Y3GFyUkctVn1gD2pxYWgS3rL/O33TGsyp1+gu7QymBgKK dfPf8Ifii7/+JRgYmGxpR+ta/zI8tNjhbEJrcXdskHbefwjTd9IYQ6oyGQnYp69n PwTivDMAnZ8qQij7dN5wgNLtIyVxyPw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=XNdNQsJgIndpidLjFsHlbqbcGswEnRl8nFAK2duGZ zk=; b=4Gq3oExl/Hl+lI1eR8kTKwafFlzXKqF+CAKcxtW/l7mrOpiS6SkZuvdtk 47o3PgCL4XudjjFIq52vE+g6Iw8zoIF9J7SCOTnyJdK5OnCXL4rvKHVW+vROSs2a Evqc9ofBdTZwxizFRzJyrbZ4U3ofo+V+B22oAHPLrTrJFEuIvzbd2Vxk4TY4FQig QzSxZp8BRs2mD/+zR5ZaMauisi2Wvlq97duOGfwnjCBINi8YV3B32LYCXZwC2wUw 0SOKTioT3y5hZlRbAv9hzWsaI623zCbJiHNpRsZ0OJSvpZsp2GBgQO8g7H9g7WTo k1jN8JC40lyuMkuVnmzajOmIdF0kA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkedugddvgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 2DF7BE4448; Tue, 26 Mar 2019 20:42:50 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org Date: Wed, 27 Mar 2019 01:42:48 +0100 Message-ID: <2813435.odFC1KYpGd@xps> In-Reply-To: <20190326192556.19934-1-stephen@networkplumber.org> References: <20190326192556.19934-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [RFC] eal: rename state values in rte_lcore_state 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" Message-ID: <20190327004248.JY4oLQhc5MSg_Z4QUSVmJ61dfWnLtKGZFQxIY2EFaD4@z> 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.