Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/55356/?format=api
http://patches.dpdk.org/api/patches/55356/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/bdd87b1670d74f7d85676739f6b94ede906b6029.1561478388.git.anatoly.burakov@intel.com/", "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": "<bdd87b1670d74f7d85676739f6b94ede906b6029.1561478388.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/bdd87b1670d74f7d85676739f6b94ede906b6029.1561478388.git.anatoly.burakov@intel.com", "date": "2019-06-25T16:05:13", "name": "[v2,01/14] eal: add API to lock/unlock memory hotplug", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "4acb4762b5e8b1efad161973f3f8ea533237fecf", "submitter": { "id": 4, "url": "http://patches.dpdk.org/api/people/4/?format=api", "name": "Burakov, Anatoly", "email": "anatoly.burakov@intel.com" }, "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/bdd87b1670d74f7d85676739f6b94ede906b6029.1561478388.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 5162, "url": "http://patches.dpdk.org/api/series/5162/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5162", "date": "2019-06-25T16:05:12", "name": "Make shared memory config non-public", "version": 2, "mbox": "http://patches.dpdk.org/series/5162/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/55356/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/55356/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 F096F1BA5B;\n\tTue, 25 Jun 2019 18:05:45 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 9FEA91B9FC\n\tfor <dev@dpdk.org>; Tue, 25 Jun 2019 18:05:41 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jun 2019 09:05:30 -0700", "from silpixa00399498.ir.intel.com (HELO\n\tsilpixa00399498.ger.corp.intel.com) ([10.237.223.125])\n\tby orsmga005.jf.intel.com with ESMTP; 25 Jun 2019 09:05:28 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.63,416,1557212400\"; d=\"scan'208\";a=\"336894680\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "Bruce Richardson <bruce.richardson@intel.com>, david.marchand@redhat.com,\n\tthomas@monjalon.net, stephen@networkplumber.org", "Date": "Tue, 25 Jun 2019 17:05:13 +0100", "Message-Id": "<bdd87b1670d74f7d85676739f6b94ede906b6029.1561478388.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": [ "<cover.1561478388.git.anatoly.burakov@intel.com>", "<cover.1561478388.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1561478388.git.anatoly.burakov@intel.com>", "<cover.1559147228.git.anatoly.burakov@intel.com>\n\t<cover.1561478388.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH v2 01/14] eal: add API to lock/unlock memory\n\thotplug", "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": "Currently, the memory hotplug is locked automatically by all\nmemory-related _walk() functions, but sometimes locking the\nmemory subsystem outside of them is needed. There is no\npublic API to do that, so it creates a dependency on shared\nmemory config to be public. Fix this by introducing a new\nAPI to lock/unlock the memory hotplug subsystem.\n\nCreate a new common file for all things mem config, and a\nnew API namespace rte_mcfg_*.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/eal_common_mcfg.c | 34 +++++++++++++++++++\n .../common/include/rte_eal_memconfig.h | 24 +++++++++++++\n lib/librte_eal/common/meson.build | 1 +\n lib/librte_eal/freebsd/eal/Makefile | 1 +\n lib/librte_eal/linux/eal/Makefile | 1 +\n lib/librte_eal/rte_eal_version.map | 4 +++\n 6 files changed, 65 insertions(+)\n create mode 100644 lib/librte_eal/common/eal_common_mcfg.c", "diff": "diff --git a/lib/librte_eal/common/eal_common_mcfg.c b/lib/librte_eal/common/eal_common_mcfg.c\nnew file mode 100644\nindex 000000000..985d36cc2\n--- /dev/null\n+++ b/lib/librte_eal/common/eal_common_mcfg.c\n@@ -0,0 +1,34 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019 Intel Corporation\n+ */\n+\n+#include <rte_config.h>\n+#include <rte_eal_memconfig.h>\n+\n+void\n+rte_mcfg_mem_read_lock(void)\n+{\n+\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\trte_rwlock_read_lock(&mcfg->memory_hotplug_lock);\n+}\n+\n+void\n+rte_mcfg_mem_read_unlock(void)\n+{\n+\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\trte_rwlock_read_unlock(&mcfg->memory_hotplug_lock);\n+}\n+\n+void\n+rte_mcfg_mem_write_lock(void)\n+{\n+\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\trte_rwlock_write_lock(&mcfg->memory_hotplug_lock);\n+}\n+\n+void\n+rte_mcfg_mem_write_unlock(void)\n+{\n+\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\trte_rwlock_write_unlock(&mcfg->memory_hotplug_lock);\n+}\ndiff --git a/lib/librte_eal/common/include/rte_eal_memconfig.h b/lib/librte_eal/common/include/rte_eal_memconfig.h\nindex 84aabe36c..a554518ef 100644\n--- a/lib/librte_eal/common/include/rte_eal_memconfig.h\n+++ b/lib/librte_eal/common/include/rte_eal_memconfig.h\n@@ -100,6 +100,30 @@ rte_eal_mcfg_wait_complete(struct rte_mem_config* mcfg)\n \t\trte_pause();\n }\n \n+/**\n+ * Lock the internal EAL shared memory configuration for shared access.\n+ */\n+void\n+rte_mcfg_mem_read_lock(void);\n+\n+/**\n+ * Unlock the internal EAL shared memory configuration for shared access.\n+ */\n+void\n+rte_mcfg_mem_read_unlock(void);\n+\n+/**\n+ * Lock the internal EAL shared memory configuration for exclusive access.\n+ */\n+void\n+rte_mcfg_mem_write_lock(void);\n+\n+/**\n+ * Unlock the internal EAL shared memory configuration for exclusive access.\n+ */\n+void\n+rte_mcfg_mem_write_unlock(void);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build\nindex 0670e4102..710168b29 100644\n--- a/lib/librte_eal/common/meson.build\n+++ b/lib/librte_eal/common/meson.build\n@@ -18,6 +18,7 @@ common_sources = files(\n \t'eal_common_launch.c',\n \t'eal_common_lcore.c',\n \t'eal_common_log.c',\n+\t'eal_common_mcfg.c',\n \t'eal_common_memalloc.c',\n \t'eal_common_memory.c',\n \t'eal_common_memzone.c',\ndiff --git a/lib/librte_eal/freebsd/eal/Makefile b/lib/librte_eal/freebsd/eal/Makefile\nindex 19854ee2c..dc56af582 100644\n--- a/lib/librte_eal/freebsd/eal/Makefile\n+++ b/lib/librte_eal/freebsd/eal/Makefile\n@@ -44,6 +44,7 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += eal_common_timer.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += eal_common_memzone.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += eal_common_log.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += eal_common_launch.c\n+SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += eal_common_mcfg.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += eal_common_memalloc.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += eal_common_memory.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += eal_common_tailqs.c\ndiff --git a/lib/librte_eal/linux/eal/Makefile b/lib/librte_eal/linux/eal/Makefile\nindex 6e5261152..3b2642eb8 100644\n--- a/lib/librte_eal/linux/eal/Makefile\n+++ b/lib/librte_eal/linux/eal/Makefile\n@@ -52,6 +52,7 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += eal_common_timer.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += eal_common_memzone.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += eal_common_log.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += eal_common_launch.c\n+SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += eal_common_mcfg.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += eal_common_memalloc.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += eal_common_memory.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += eal_common_tailqs.c\ndiff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map\nindex 824edf0ff..faad879db 100644\n--- a/lib/librte_eal/rte_eal_version.map\n+++ b/lib/librte_eal/rte_eal_version.map\n@@ -292,6 +292,10 @@ DPDK_19.08 {\n \n \trte_lcore_index;\n \trte_lcore_to_socket_id;\n+\trte_mcfg_mem_read_lock;\n+\trte_mcfg_mem_read_unlock;\n+\trte_mcfg_mem_write_lock;\n+\trte_mcfg_mem_write_unlock;\n \n } DPDK_19.05;\n \n", "prefixes": [ "v2", "01/14" ] }{ "id": 55356, "url": "