Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/69009/?format=api
http://patches.dpdk.org/api/patches/69009/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/b9b8f8b9efc33b447c861719f2ce03af20831700.1587405227.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": "<b9b8f8b9efc33b447c861719f2ce03af20831700.1587405227.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/b9b8f8b9efc33b447c861719f2ce03af20831700.1587405227.git.anatoly.burakov@intel.com", "date": "2020-04-20T17:56:51", "name": "[v2,1/2] l3fwd-power: exit if initializing power library failed", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "a6348a8859a2d9140479112c9106a988f22dadff", "submitter": { "id": 4, "url": "http://patches.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "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/b9b8f8b9efc33b447c861719f2ce03af20831700.1587405227.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 9542, "url": "http://patches.dpdk.org/api/series/9542/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9542", "date": "2020-04-20T17:56:51", "name": "[v2,1/2] l3fwd-power: exit if initializing power library failed", "version": 2, "mbox": "http://patches.dpdk.org/series/9542/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/69009/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/69009/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 320E4A0598;\n\tTue, 21 Apr 2020 12:50:04 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7ACE31D8F1;\n\tTue, 21 Apr 2020 12:50:03 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id DE1831D8E9\n for <dev@dpdk.org>; Tue, 21 Apr 2020 12:50:01 +0200 (CEST)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Apr 2020 03:50:00 -0700", "from aburakov-mobl.ger.corp.intel.com (HELO localhost.localdomain)\n ([10.213.208.123])\n by fmsmga005.fm.intel.com with ESMTP; 21 Apr 2020 03:50:00 -0700" ], "IronPort-SDR": [ "\n GYlnUUgA44IzdvOznITmQeTXOdozbQBjH5xSdrXrME9omftgcJCq3kxe/G8UMILwPrrG5mNaYh\n d2d7tSTAaEcA==", "\n LPam7gdF+y7hOGQQ1FXvf/4SClG1zcgaVGP3WAUGilhMxNeQDbujuZkeBOvb1EP9c968HYWXhb\n bGJSaoxY5lzQ==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.72,410,1580803200\"; d=\"scan'208\";a=\"456058652\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "David Hunt <david.hunt@intel.com>,\n\treshma.pattan@intel.com", "Date": "Mon, 20 Apr 2020 17:56:51 +0000", "Message-Id": "\n <b9b8f8b9efc33b447c861719f2ce03af20831700.1587405227.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "\n <854770a880777e7ad200481294a7aa5ac9a45f2d.1586361368.git.anatoly.burakov@intel.com>", "References": "\n <854770a880777e7ad200481294a7aa5ac9a45f2d.1586361368.git.anatoly.burakov@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 1/2] l3fwd-power: exit if initializing power\n\tlibrary failed", "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Currently, if power library initialization fails, only a log message is\ndisplayed. This is suboptimal for a number of reasons, but the main one\nis that telemetry mode does not depend on the power library and can\ntherefore run in environments where l3fwd-power would normally not run\ncorrectly (such as inside a VM). This will lead to attempts to\ndeinitialize the power library on exit, with a subsequent forced unclean\nshutdown of DPDK.\n\nFix this by only initializing the power library in modes that actually\nneed it, and change a log message to a failure to initialize.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nAcked-by: David Hunt <david.hunt@intel.com>\nReviewed-by: Reshma Pattan <reshma.pattan@intel.com>\n---\n examples/l3fwd-power/main.c | 20 +++++++++++---------\n 1 file changed, 11 insertions(+), 9 deletions(-)", "diff": "diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c\nindex b46aa7bac..be50ec049 100644\n--- a/examples/l3fwd-power/main.c\n+++ b/examples/l3fwd-power/main.c\n@@ -2065,15 +2065,17 @@ static int check_ptype(uint16_t portid)\n static int\n init_power_library(void)\n {\n-\tint ret = 0, lcore_id;\n-\tfor (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {\n-\t\tif (rte_lcore_is_enabled(lcore_id)) {\n-\t\t\t/* init power management library */\n-\t\t\tret = rte_power_init(lcore_id);\n-\t\t\tif (ret)\n-\t\t\t\tRTE_LOG(ERR, POWER,\n+\tunsigned int lcore_id;\n+\tint ret = 0;\n+\n+\tRTE_LCORE_FOREACH(lcore_id) {\n+\t\t/* init power management library */\n+\t\tret = rte_power_init(lcore_id);\n+\t\tif (ret) {\n+\t\t\tRTE_LOG(ERR, POWER,\n \t\t\t\t\"Library initialization failed on core %u\\n\",\n \t\t\t\tlcore_id);\n+\t\t\treturn ret;\n \t\t}\n \t}\n \treturn ret;\n@@ -2224,8 +2226,8 @@ main(int argc, char **argv)\n \tif (ret < 0)\n \t\trte_exit(EXIT_FAILURE, \"Invalid L3FWD parameters\\n\");\n \n-\tif (init_power_library())\n-\t\tRTE_LOG(ERR, L3FWD_POWER, \"init_power_library failed\\n\");\n+\tif (app_mode != APP_MODE_TELEMETRY && init_power_library())\n+\t\trte_exit(EXIT_FAILURE, \"init_power_library failed\\n\");\n \n \tif (update_lcore_params() < 0)\n \t\trte_exit(EXIT_FAILURE, \"update_lcore_params failed\\n\");\n", "prefixes": [ "v2", "1/2" ] }{ "id": 69009, "url": "