Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/11208/?format=api
http://patches.dpdk.org/api/patches/11208/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1457456825-28667-2-git-send-email-harry.van.haaren@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": "<1457456825-28667-2-git-send-email-harry.van.haaren@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1457456825-28667-2-git-send-email-harry.van.haaren@intel.com", "date": "2016-03-08T17:07:04", "name": "[dpdk-dev,v7,1/2] eal: fix race-condition in pri/sec proc startup", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "4138f9bad084c92568a5f1e9a5cf1a026a19f414", "submitter": { "id": 317, "url": "http://patches.dpdk.org/api/people/317/?format=api", "name": "Van Haaren, Harry", "email": "harry.van.haaren@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/1457456825-28667-2-git-send-email-harry.van.haaren@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/11208/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/11208/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 5506137A6;\n\tTue, 8 Mar 2016 18:09:10 +0100 (CET)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 6AB6E37A4\n\tfor <dev@dpdk.org>; Tue, 8 Mar 2016 18:09:09 +0100 (CET)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga103.fm.intel.com with ESMTP; 08 Mar 2016 09:07:31 -0800", "from sie-lab-212-120.ir.intel.com (HELO\n\tsilpixa00394367.ir.intel.com) ([10.237.212.120])\n\tby fmsmga002.fm.intel.com with ESMTP; 08 Mar 2016 09:07:30 -0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.22,557,1449561600\"; d=\"scan'208\";a=\"932333717\"", "From": "Harry van Haaren <harry.van.haaren@intel.com>", "To": "david.marchand@6wind.com", "Date": "Tue, 8 Mar 2016 17:07:04 +0000", "Message-Id": "<1457456825-28667-2-git-send-email-harry.van.haaren@intel.com>", "X-Mailer": "git-send-email 2.5.0", "In-Reply-To": "<1457456825-28667-1-git-send-email-harry.van.haaren@intel.com>", "References": "<1457352177-12567-1-git-send-email-harry.van.haaren@intel.com>\n\t<1457456825-28667-1-git-send-email-harry.van.haaren@intel.com>", "Cc": "dev@dpdk.org", "Subject": "[dpdk-dev] [PATCH v7 1/2] eal: fix race-condition in pri/sec proc\n\tstartup", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch fixes a race-condition when a primary and\nsecondary process simultaneously probe PCI devices.\n\nThis is implemented by moving the rte_eal_mcfg_complete()\nfunction call in rte_eal_init() until after rte_eal_pci_probe().\n\nThe end result is that the secondary process waits longer,\nuntil the primary has completed its PCI probing, and then\nnotifies the secondary process.\n\nThis race-condition became visible during the development of\na function that allows a secondary process to be polling until\na primary process exists. The secondary would then probe PCI\ndevices at the same time, causing an error during rte_eal_init()\n\nLinux EAL:\nFixes: 916e4f4f4e45 (\"memory: fix for multi process support\")\n\nBSD EAL:\nFixes: 764bf26873b9 (\"add FreeBSD support\")\n\nSigned-off-by: Harry van Haaren <harry.van.haaren@intel.com>\n---\n lib/librte_eal/bsdapp/eal/eal.c | 6 +++---\n lib/librte_eal/linuxapp/eal/eal.c | 6 +++---\n 2 files changed, 6 insertions(+), 6 deletions(-)", "diff": "diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c\nindex a34e61d..06bfd4e 100644\n--- a/lib/librte_eal/bsdapp/eal/eal.c\n+++ b/lib/librte_eal/bsdapp/eal/eal.c\n@@ -1,7 +1,7 @@\n /*-\n * BSD LICENSE\n *\n- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ * Copyright(c) 2010-2016 Intel Corporation. All rights reserved.\n * Copyright(c) 2014 6WIND S.A.\n * All rights reserved.\n *\n@@ -569,8 +569,6 @@ rte_eal_init(int argc, char **argv)\n \n \teal_check_mem_on_local_socket();\n \n-\trte_eal_mcfg_complete();\n-\n \tif (eal_plugins_init() < 0)\n \t\trte_panic(\"Cannot init plugins\\n\");\n \n@@ -621,6 +619,8 @@ rte_eal_init(int argc, char **argv)\n \tif (rte_eal_pci_probe())\n \t\trte_panic(\"Cannot probe PCI\\n\");\n \n+\trte_eal_mcfg_complete();\n+\n \treturn fctret;\n }\n \ndiff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c\nindex ceac435..364f303 100644\n--- a/lib/librte_eal/linuxapp/eal/eal.c\n+++ b/lib/librte_eal/linuxapp/eal/eal.c\n@@ -1,7 +1,7 @@\n /*-\n * BSD LICENSE\n *\n- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ * Copyright(c) 2010-2016 Intel Corporation. All rights reserved.\n * Copyright(c) 2012-2014 6WIND S.A.\n * All rights reserved.\n *\n@@ -821,8 +821,6 @@ rte_eal_init(int argc, char **argv)\n \n \teal_check_mem_on_local_socket();\n \n-\trte_eal_mcfg_complete();\n-\n \tif (eal_plugins_init() < 0)\n \t\trte_panic(\"Cannot init plugins\\n\");\n \n@@ -880,6 +878,8 @@ rte_eal_init(int argc, char **argv)\n \tif (rte_eal_pci_probe())\n \t\trte_panic(\"Cannot probe PCI\\n\");\n \n+\trte_eal_mcfg_complete();\n+\n \treturn fctret;\n }\n \n", "prefixes": [ "dpdk-dev", "v7", "1/2" ] }{ "id": 11208, "url": "