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 2680EA0679 for ; Tue, 2 Apr 2019 23:07:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ECF8C1B1A0; Tue, 2 Apr 2019 23:07:05 +0200 (CEST) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id 766C21B136 for ; Tue, 2 Apr 2019 23:07:04 +0200 (CEST) Received: by mail-pf1-f193.google.com with SMTP id i17so6986667pfo.6 for ; Tue, 02 Apr 2019 14:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dEQQuLOtYzhhjIYdOnJqFiaHo2KgatkDM6PlNizfYFk=; b=eG1zpe25V9/lp255y0BIWt0gsGTdGdpCdveeddFmfAJ1svMpT8nCQS0iKo6ErFCAFI qinfD+AFMJJ7Yef3yMGv5ZzLy6S2Zyy1fYncmXnQxWYkz+ATIVRnsiMUG5DUYT1c8BhV DogFTseTPLZMB9a0RCNT1Xt/q0DJRDXJHGwfcVXPFpqOGjM4PRiJ4mdfkbKXp6we03aw 5DAAxCRrmBV+zMZMVe5zDGlTs9O7SaFwD7xrf+nsG0M8UjEw9OS/yHT1NaRXKYT6Ge5D kcE2vvKr9e17OYK6Sz6Dw7fpdP6yU45oxzETZLgiJ7YEQ6g5+opvgyAPwUKxvD9EVcK7 shIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dEQQuLOtYzhhjIYdOnJqFiaHo2KgatkDM6PlNizfYFk=; b=oePGEovZ4bKOqHPJyFwYHGAqF+lNNouMGLMjfE24zOMEjbICrPRCsEHxoMdMjvGqGD tNu1meZnB4UWgQ+jiecASKCWb1FfmUGp8lsxdCkffBL2lIGB5IeRU2cp/Gj0Gg837EUd 22aoVZibWMzr3hhxtCtFDDrxeza7P29Ouo5ySp9dxggNfKLxJnGICHQPsP0TS7w5va5/ jUa1h2WAkZGxFIpSUqReaRG9uWpSRa6wUfgHI+2Se6TX0+4iTIhoaBB4J4laA0VDjojN OwmjKWFj5aZSoJmYIb0xzylRuXjCMqVfQ0zhe8lKlHangof6WwCIGjMt/uUz/30KKYJ/ awmg== X-Gm-Message-State: APjAAAWy8N31hLdIy8UJ3nCfpowW8uzVV8Cp1el2HqTcTvjV6OU9qA+H QjtaB90V+y8cIUkQbxlSfsGOrQ== X-Google-Smtp-Source: APXvYqxZo71vCiB18YSw2LhoFVYQuGNUcYeiJ2d2tOJezOdLg6OgxmYNUsNunlJKWKWu6oBBQ/1aXw== X-Received: by 2002:a62:1197:: with SMTP id 23mr70712026pfr.210.1554239223495; Tue, 02 Apr 2019 14:07:03 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id y19sm19805693pfn.164.2019.04.02.14.07.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2019 14:07:03 -0700 (PDT) Date: Tue, 2 Apr 2019 14:07:01 -0700 From: Stephen Hemminger To: David Marchand Cc: dev Message-ID: <20190402140701.058d983c@shemminger-XPS-13-9360> In-Reply-To: References: <20190326192556.19934-1-stephen@networkplumber.org> <20190402155722.21400-1-stephen@networkplumber.org> <20190402134800.789bd9bf@shemminger-XPS-13-9360> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] 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: <20190402210701.SRRgtBOyih96mwWhslKw5Rfj3IrzwU4JhkmuYthemOY@z> On Tue, 2 Apr 2019 23:03:06 +0200 David Marchand 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 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.