Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/53848/?format=api
http://patches.dpdk.org/api/patches/53848/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/f858e7b5708dc04424e3c230235108b5eae76e79.1559147228.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": "<f858e7b5708dc04424e3c230235108b5eae76e79.1559147228.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/f858e7b5708dc04424e3c230235108b5eae76e79.1559147228.git.anatoly.burakov@intel.com", "date": "2019-05-29T16:31:07", "name": "[21/25] eal: add new API to lock/unlock mempool list", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "de935f2d0d20fb5b9c8688780b9905affa835360", "submitter": { "id": 4, "url": "http://patches.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/f858e7b5708dc04424e3c230235108b5eae76e79.1559147228.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 4813, "url": "http://patches.dpdk.org/api/series/4813/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4813", "date": "2019-05-29T16:30:46", "name": "Make shared memory config non-public", "version": 1, "mbox": "http://patches.dpdk.org/series/4813/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/53848/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/53848/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 F0E471BA4D;\n\tWed, 29 May 2019 18:31:59 +0200 (CEST)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 129F11B9DA\n\tfor <dev@dpdk.org>; Wed, 29 May 2019 18:31:52 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 May 2019 09:31:52 -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; 29 May 2019 09:31:51 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "stephen@networkplumber.org, thomas@monjalon.net,\n\tdavid.marchand@redhat.com", "Date": "Wed, 29 May 2019 17:31:07 +0100", "Message-Id": "<f858e7b5708dc04424e3c230235108b5eae76e79.1559147228.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": [ "<cover.1559147228.git.anatoly.burakov@intel.com>", "<cover.1559147228.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1559147228.git.anatoly.burakov@intel.com>", "<cover.1559147228.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH 21/25] eal: add new API to lock/unlock mempool\n\tlist", "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, in order to lock access to the mempool list, a direct\naccess to the shared memory structure is needed. Add an API to do\nthe same.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/eal_common_memory.c | 28 +++++++++++++++++++\n .../common/include/rte_eal_memconfig.h | 24 ++++++++++++++++\n lib/librte_eal/rte_eal_version.map | 4 +++\n 3 files changed, 56 insertions(+)", "diff": "diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c\nindex e95fe484f..c398e6f0b 100644\n--- a/lib/librte_eal/common/eal_common_memory.c\n+++ b/lib/librte_eal/common/eal_common_memory.c\n@@ -735,6 +735,34 @@ rte_eal_mcfg_tailq_write_unlock(void)\n \trte_rwlock_write_unlock(&mcfg->qlock);\n }\n \n+void\n+rte_eal_mcfg_mempool_read_lock(void)\n+{\n+\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\trte_rwlock_read_lock(&mcfg->mplock);\n+}\n+\n+void\n+rte_eal_mcfg_mempool_read_unlock(void)\n+{\n+\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\trte_rwlock_read_unlock(&mcfg->mplock);\n+}\n+\n+void\n+rte_eal_mcfg_mempool_write_lock(void)\n+{\n+\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\trte_rwlock_write_lock(&mcfg->mplock);\n+}\n+\n+void\n+rte_eal_mcfg_mempool_write_unlock(void)\n+{\n+\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\trte_rwlock_write_unlock(&mcfg->mplock);\n+}\n+\n int __rte_experimental\n rte_memseg_get_fd_thread_unsafe(const struct rte_memseg *ms)\n {\ndiff --git a/lib/librte_eal/common/include/rte_eal_memconfig.h b/lib/librte_eal/common/include/rte_eal_memconfig.h\nindex 5aeda92b9..d0bd5836b 100644\n--- a/lib/librte_eal/common/include/rte_eal_memconfig.h\n+++ b/lib/librte_eal/common/include/rte_eal_memconfig.h\n@@ -148,6 +148,30 @@ rte_eal_mcfg_tailq_write_lock(void);\n void\n rte_eal_mcfg_tailq_write_unlock(void);\n \n+/**\n+ * Lock the internal EAL Mempool list for shared access.\n+ */\n+void\n+rte_eal_mcfg_mempool_read_lock(void);\n+\n+/**\n+ * Unlock the internal EAL Mempool list for shared access.\n+ */\n+void\n+rte_eal_mcfg_mempool_read_unlock(void);\n+\n+/**\n+ * Lock the internal EAL Mempool list for exclusive access.\n+ */\n+void\n+rte_eal_mcfg_mempool_write_lock(void);\n+\n+/**\n+ * Unlock the internal EAL Mempool list for exclusive access.\n+ */\n+void\n+rte_eal_mcfg_mempool_write_unlock(void);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map\nindex fa85cff79..255e6e036 100644\n--- a/lib/librte_eal/rte_eal_version.map\n+++ b/lib/librte_eal/rte_eal_version.map\n@@ -294,6 +294,10 @@ DPDK_19.08 {\n \trte_eal_mcfg_mem_read_unlock;\n \trte_eal_mcfg_mem_write_lock;\n \trte_eal_mcfg_mem_write_unlock;\n+\trte_eal_mcfg_mempool_read_lock;\n+\trte_eal_mcfg_mempool_read_unlock;\n+\trte_eal_mcfg_mempool_write_lock;\n+\trte_eal_mcfg_mempool_write_unlock;\n \trte_eal_mcfg_tailq_read_lock;\n \trte_eal_mcfg_tailq_read_unlock;\n \trte_eal_mcfg_tailq_write_lock;\n", "prefixes": [ "21/25" ] }{ "id": 53848, "url": "