Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/52218/?format=api
http://patches.dpdk.org/api/patches/52218/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190403171610.23970-6-stephen@networkplumber.org/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20190403171610.23970-6-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20190403171610.23970-6-stephen@networkplumber.org", "date": "2019-04-03T17:16:10", "name": "[RFC,5/5] eal: make lcore_config private", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "fe83c7c95e7b6495461900454dc49dc5b2729259", "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190403171610.23970-6-stephen@networkplumber.org/mbox/", "series": [ { "id": 4095, "url": "http://patches.dpdk.org/api/series/4095/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4095", "date": "2019-04-03T17:16:05", "name": "make lcore_config less visible", "version": 1, "mbox": "http://patches.dpdk.org/series/4095/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/52218/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/52218/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D3E3D1B552;\n\tWed, 3 Apr 2019 19:16:43 +0200 (CEST)", "from mail-pl1-f172.google.com (mail-pl1-f172.google.com\n\t[209.85.214.172]) by dpdk.org (Postfix) with ESMTP id 4F33B1B4ED\n\tfor <dev@dpdk.org>; Wed, 3 Apr 2019 19:16:23 +0200 (CEST)", "by mail-pl1-f172.google.com with SMTP id cv12so8355862plb.9\n\tfor <dev@dpdk.org>; Wed, 03 Apr 2019 10:16:23 -0700 (PDT)", "from shemminger-XPS-13-9360.lan (204-195-22-127.wavecable.com.\n\t[204.195.22.127]) by smtp.gmail.com with ESMTPSA id\n\tk14sm23041693pfb.125.2019.04.03.10.16.20\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 03 Apr 2019 10:16:20 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=1Wyg4VdHfKq4QGssJQdDeYpiRXh7Nvcr53RdAB9586o=;\n\tb=RjTYdXZBshmmzJqa0wiIJ+DrM8wSwTBqGX1/uzyp54zk1h4CV3/g1v+OslZxt9jY14\n\tG5NhVFyq9VMWu6iFzIPR5pETrKveoGAkzWZ5za6eGiUOYi+i2klV125ZMh+ovUyMEUXL\n\t/Tpof4fE92Qbxk5X9z4/+Ml4l7dZX4Id460ahxpyD4hb31pXX0DTsoEt8a5/+DnvgTPh\n\t3MRIt5m6MoVL+yvIRhjuRyb5bKbxJEn3olCD9TNMk3yjxFiE0k5ozseZjPk0DVdelvRd\n\t1qVdlvvKFsPd80EhXu+nFGX7b9IeMo8/jscOs30thdMUI61FPBR6uRpDDRjPI/NtuEP4\n\tBF8A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=1Wyg4VdHfKq4QGssJQdDeYpiRXh7Nvcr53RdAB9586o=;\n\tb=ToV7mqKmYj8JyOmivrnNVtvg6QUfkJ64cv/v9y+qMN9wld/pdrl9OjUuaOsKYzeJYc\n\t3RlVK9RlVDDIlX95aoN4pjxj8cl/UFTuf112t1hNuvIQryXKEtQoXcU+53r3dcAuY4zm\n\trpqRcDiH/CKAHmD2aHeyPer9alm+/AZFX/uV7r4YZ/L0aTQUtG71wlzZunRYmql9L3t6\n\tXkbLgkohoGAPtsz0srnRxw7QylMf4mt0PNGVKFuOJSSAz+FuTRoL0Pd0vg60dv//U2Vh\n\tUTYthLIUs2tC0PRTMO+bo+kxZ+8dz5GDc7wWWmFvdN5pXFBFfPFImhK0yXN8N1GwOch9\n\tlwIw==", "X-Gm-Message-State": "APjAAAWOObkVyFJ3dyURlJWUgJGpPVyNeO6au45ut+VH705IoRS4SlU6\n\tHje7UDqFrWeGN977Sn+Lu4F4EOlwHDKP/A==", "X-Google-Smtp-Source": "APXvYqxfo1teMIlQr4CFDz52PC+g6Fb/RVL/GS68nomuCJ+Tcl644cRYhn6PWKoR4naTuw4B4Cti8Q==", "X-Received": "by 2002:a17:902:bd92:: with SMTP id\n\tq18mr1159957pls.136.1554311782179; \n\tWed, 03 Apr 2019 10:16:22 -0700 (PDT)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Cc": "Stephen Hemminger <stephen@networkplumber.org>", "Date": "Wed, 3 Apr 2019 10:16:10 -0700", "Message-Id": "<20190403171610.23970-6-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190403171610.23970-1-stephen@networkplumber.org>", "References": "<20190403171610.23970-1-stephen@networkplumber.org>", "Subject": "[dpdk-dev] [RFC 5/5] eal: make lcore_config private", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "The internal structure of lcore_config should not be part of\nvisible API/ABI. Make it private to EAL.\n\nRearrange and resize the fields in the structure so it takes\nless memory (and cache footprint).\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_eal/common/eal_common_launch.c | 2 ++\n lib/librte_eal/common/eal_private.h | 22 +++++++++++++++++++++\n lib/librte_eal/common/include/rte_lcore.h | 24 -----------------------\n lib/librte_eal/common/rte_service.c | 2 ++\n lib/librte_eal/rte_eal_version.map | 1 -\n 5 files changed, 26 insertions(+), 25 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/eal_common_launch.c b/lib/librte_eal/common/eal_common_launch.c\nindex fe0ba3f0d617..cf52d717f68e 100644\n--- a/lib/librte_eal/common/eal_common_launch.c\n+++ b/lib/librte_eal/common/eal_common_launch.c\n@@ -15,6 +15,8 @@\n #include <rte_per_lcore.h>\n #include <rte_lcore.h>\n \n+#include \"eal_private.h\"\n+\n /*\n * Wait until a lcore finished its job.\n */\ndiff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h\nindex 798ede553b21..25e80547904f 100644\n--- a/lib/librte_eal/common/eal_private.h\n+++ b/lib/librte_eal/common/eal_private.h\n@@ -10,6 +10,28 @@\n #include <stdio.h>\n \n #include <rte_dev.h>\n+#include <rte_lcore.h>\n+\n+/**\n+ * Structure storing internal configuration (per-lcore)\n+ */\n+struct lcore_config {\n+\tuint32_t core_id; /**< core number on socket for this lcore */\n+\tuint32_t core_index; /**< relative index, starting from 0 */\n+\tuint16_t socket_id; /**< physical socket id for this lcore */\n+\tuint8_t core_role; /**< role of core eg: OFF, RTE, SERVICE */\n+\tuint8_t detected; /**< true if lcore was detected */\n+\tvolatile enum rte_lcore_state_t state; /**< lcore state */\n+\trte_cpuset_t cpuset; /**< cpu set which the lcore affinity to */\n+\tpthread_t thread_id; /**< pthread identifier */\n+\tint pipe_master2slave[2]; /**< communication pipe with master */\n+\tint pipe_slave2master[2]; /**< communication pipe with master */\n+\tlcore_function_t * volatile f; /**< function to call */\n+\tvoid * volatile arg; /**< argument of function */\n+\tvolatile int ret; /**< return value of function */\n+};\n+\n+extern struct lcore_config lcore_config[RTE_MAX_LCORE];\n \n /**\n * Initialize the memzone subsystem (private to eal).\ndiff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h\nindex 7477ed2d9550..0b157b3e07ce 100644\n--- a/lib/librte_eal/common/include/rte_lcore.h\n+++ b/lib/librte_eal/common/include/rte_lcore.h\n@@ -37,30 +37,6 @@ typedef cpuset_t rte_cpuset_t;\n } while (0)\n #endif\n \n-/**\n- * Structure storing internal configuration (per-lcore)\n- */\n-struct lcore_config {\n-\tunsigned detected; /**< true if lcore was detected */\n-\tpthread_t thread_id; /**< pthread identifier */\n-\tint pipe_master2slave[2]; /**< communication pipe with master */\n-\tint pipe_slave2master[2]; /**< communication pipe with master */\n-\tlcore_function_t * volatile f; /**< function to call */\n-\tvoid * volatile arg; /**< argument of function */\n-\tvolatile int ret; /**< return value of function */\n-\tvolatile enum rte_lcore_state_t state; /**< lcore state */\n-\tunsigned socket_id; /**< physical socket id for this lcore */\n-\tunsigned core_id; /**< core number on socket for this lcore */\n-\tint core_index; /**< relative index, starting from 0 */\n-\trte_cpuset_t cpuset; /**< cpu set which the lcore affinity to */\n-\tuint8_t core_role; /**< role of core eg: OFF, RTE, SERVICE */\n-};\n-\n-/**\n- * Internal configuration (per-lcore)\n- */\n-extern struct lcore_config lcore_config[RTE_MAX_LCORE];\n-\n RTE_DECLARE_PER_LCORE(unsigned, _lcore_id); /**< Per thread \"lcore id\". */\n RTE_DECLARE_PER_LCORE(rte_cpuset_t, _cpuset); /**< Per thread \"cpuset\". */\n \ndiff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c\nindex 5f75e5a53fbf..8d53d966446a 100644\n--- a/lib/librte_eal/common/rte_service.c\n+++ b/lib/librte_eal/common/rte_service.c\n@@ -21,6 +21,8 @@\n #include <rte_memory.h>\n #include <rte_malloc.h>\n \n+#include \"eal_private.h\"\n+\n #define RTE_SERVICE_NUM_MAX 64\n \n #define SERVICE_F_REGISTERED (1 << 0)\ndiff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map\nindex d6e375135ad1..291e56dabc91 100644\n--- a/lib/librte_eal/rte_eal_version.map\n+++ b/lib/librte_eal/rte_eal_version.map\n@@ -4,7 +4,6 @@ DPDK_2.0 {\n \t__rte_panic;\n \teal_parse_sysfs_value;\n \teal_timer_source;\n-\tlcore_config;\n \tper_lcore__lcore_id;\n \tper_lcore__rte_errno;\n \trte_calloc;\n", "prefixes": [ "RFC", "5/5" ] }{ "id": 52218, "url": "