Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/55367/?format=api
http://patches.dpdk.org/api/patches/55367/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/a1b71bf3d7c2032cb95050dfe5759e4a47157bc4.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": "<a1b71bf3d7c2032cb95050dfe5759e4a47157bc4.1561478388.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/a1b71bf3d7c2032cb95050dfe5759e4a47157bc4.1561478388.git.anatoly.burakov@intel.com", "date": "2019-06-25T16:05:24", "name": "[v2,12/14] eal: unify and move mcfg complete function", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "663a6890fc34956b5f53f092315466502076fb70", "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/a1b71bf3d7c2032cb95050dfe5759e4a47157bc4.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/55367/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/55367/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 6172F1BB5C;\n\tTue, 25 Jun 2019 18:06:14 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 0699A1BAB5\n\tfor <dev@dpdk.org>; Tue, 25 Jun 2019 18:05:54 +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:54 -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:52 -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=\"336894849\"", "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:24 +0100", "Message-Id": "<a1b71bf3d7c2032cb95050dfe5759e4a47157bc4.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 12/14] eal: unify and move mcfg complete\n\tfunction", "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, mcfg completion function exists in two independent\nimplementations doing the same thing, which is bug prone.\nUnify the two functions and move them into one place.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/eal_common_mcfg.c | 14 ++++++++++++++\n lib/librte_eal/common/eal_memcfg.h | 5 +++++\n lib/librte_eal/freebsd/eal/eal.c | 12 +-----------\n lib/librte_eal/linux/eal/eal.c | 12 +-----------\n 4 files changed, 21 insertions(+), 22 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/eal_common_mcfg.c b/lib/librte_eal/common/eal_common_mcfg.c\nindex 30969c6bf..dc6665d6a 100644\n--- a/lib/librte_eal/common/eal_common_mcfg.c\n+++ b/lib/librte_eal/common/eal_common_mcfg.c\n@@ -5,8 +5,22 @@\n #include <rte_config.h>\n #include <rte_eal_memconfig.h>\n \n+#include \"eal_internal_cfg.h\"\n #include \"eal_memcfg.h\"\n \n+void\n+eal_mcfg_complete(void)\n+{\n+\tstruct rte_config *cfg = rte_eal_get_configuration();\n+\tstruct rte_mem_config *mcfg = cfg->mem_config;\n+\n+\t/* ALL shared mem_config related INIT DONE */\n+\tif (cfg->process_type == RTE_PROC_PRIMARY)\n+\t\tmcfg->magic = RTE_MAGIC;\n+\n+\tinternal_config.init_complete = 1;\n+}\n+\n void\n eal_mcfg_wait_complete(void)\n {\ndiff --git a/lib/librte_eal/common/eal_memcfg.h b/lib/librte_eal/common/eal_memcfg.h\nindex 7319d9f7a..6e2d3abc9 100644\n--- a/lib/librte_eal/common/eal_memcfg.h\n+++ b/lib/librte_eal/common/eal_memcfg.h\n@@ -72,4 +72,9 @@ struct rte_mem_config {\n void\n eal_mcfg_wait_complete(void);\n \n+/* set mem config as complete */\n+void\n+eal_mcfg_complete(void);\n+\n #endif /* EAL_MEMCFG_H */\n+\ndiff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c\nindex b3c96b5cd..e43e01042 100644\n--- a/lib/librte_eal/freebsd/eal/eal.c\n+++ b/lib/librte_eal/freebsd/eal/eal.c\n@@ -597,16 +597,6 @@ sync_func(__attribute__((unused)) void *arg)\n \treturn 0;\n }\n \n-inline static void\n-rte_eal_mcfg_complete(void)\n-{\n-\t/* ALL shared mem_config related INIT DONE */\n-\tif (rte_config.process_type == RTE_PROC_PRIMARY)\n-\t\trte_config.mem_config->magic = RTE_MAGIC;\n-\n-\tinternal_config.init_complete = 1;\n-}\n-\n /* return non-zero if hugepages are enabled. */\n int rte_eal_has_hugepages(void)\n {\n@@ -883,7 +873,7 @@ rte_eal_init(int argc, char **argv)\n \t\treturn -1;\n \t}\n \n-\trte_eal_mcfg_complete();\n+\teal_mcfg_complete();\n \n \t/* Call each registered callback, if enabled */\n \trte_option_init();\ndiff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c\nindex 9168a3e47..4b5deaa70 100644\n--- a/lib/librte_eal/linux/eal/eal.c\n+++ b/lib/librte_eal/linux/eal/eal.c\n@@ -897,16 +897,6 @@ sync_func(__attribute__((unused)) void *arg)\n \treturn 0;\n }\n \n-inline static void\n-rte_eal_mcfg_complete(void)\n-{\n-\t/* ALL shared mem_config related INIT DONE */\n-\tif (rte_config.process_type == RTE_PROC_PRIMARY)\n-\t\trte_config.mem_config->magic = RTE_MAGIC;\n-\n-\tinternal_config.init_complete = 1;\n-}\n-\n /*\n * Request iopl privilege for all RPL, returns 0 on success\n * iopl() call is mostly for the i386 architecture. For other architectures,\n@@ -1229,7 +1219,7 @@ rte_eal_init(int argc, char **argv)\n \t\treturn -1;\n \t}\n \n-\trte_eal_mcfg_complete();\n+\teal_mcfg_complete();\n \n \t/* Call each registered callback, if enabled */\n \trte_option_init();\n", "prefixes": [ "v2", "12/14" ] }{ "id": 55367, "url": "