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 7FDC8A0679 for ; Tue, 2 Apr 2019 23:03:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5AB5B1B136; Tue, 2 Apr 2019 23:03:18 +0200 (CEST) Received: from mail-vk1-f193.google.com (mail-vk1-f193.google.com [209.85.221.193]) by dpdk.org (Postfix) with ESMTP id D15821B112 for ; Tue, 2 Apr 2019 23:03:17 +0200 (CEST) Received: by mail-vk1-f193.google.com with SMTP id 195so3320189vkx.9 for ; Tue, 02 Apr 2019 14:03:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Qr4JE80L+MyGBfj8Eboh0j1Lb2u3UnKBp/Aj4HXc1so=; b=L4phbsC7mUZlPEf4uSyhUu2glJSmDpmr6o74VMa5JJHKuASlsVqz6kQZkWbeJtRc49 VEvEww7BvFBe4oQuCJyDY4pY1uHOM6C4EEnMlYES8+VgRZCwxbYK9KfvEmfpYU3Ewhy8 1XsYg0L5vAmq3Jc6Ss+V5WSClhR8OJHEAb77omuuOVANga82SdHdl6OzQRkQK0nEIm22 POVEp1ZCRhtlP9g/tH+XIBcgzyyQStnN90jPnkyhjyO6UihawVRKB8HLJT25DQD6KLx4 WtJx11FsIzQ6dU3NpDirzmRwyB2vdE8QY91pk+zObgWDPcVpR18d8bH0L/fQp2BmpUPf at5g== X-Gm-Message-State: APjAAAVH+ovJnJn4CXubHSkmsJvrm1l1oW0KkjGdm15QuEXoyZePy8jL v+tVcgsUxKPDvgFIgf1vi83/oEitsKBx33T//KyERR92fdw= X-Google-Smtp-Source: APXvYqyD+HGtMcQEhJflES/GS03vAuZ5miESZmHy9vafuFffI8eX+3Vee/BsBCGrGGo1cfuxwIogtrDlxmdEZyY2kvk= X-Received: by 2002:a1f:a4d:: with SMTP id 74mr38410443vkk.13.1554238997097; Tue, 02 Apr 2019 14:03:17 -0700 (PDT) MIME-Version: 1.0 References: <20190326192556.19934-1-stephen@networkplumber.org> <20190402155722.21400-1-stephen@networkplumber.org> <20190402134800.789bd9bf@shemminger-XPS-13-9360> In-Reply-To: <20190402134800.789bd9bf@shemminger-XPS-13-9360> From: David Marchand Date: Tue, 2 Apr 2019 23:03:06 +0200 Message-ID: To: Stephen Hemminger Cc: dev Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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: <20190402210306.kbbztHaTSd7agXuHw3mRt5Fdk9Z6r-kva-KdTX4xUOY@z> 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. 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)) { -- David Marchand