Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/73952/?format=api
http://patchwork.dpdk.org/api/patches/73952/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/42bebf7cebd2b635a60b626faf605df6d8a277c1.1594652063.git.anatoly.burakov@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<42bebf7cebd2b635a60b626faf605df6d8a277c1.1594652063.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/42bebf7cebd2b635a60b626faf605df6d8a277c1.1594652063.git.anatoly.burakov@intel.com", "date": "2020-07-13T14:54:27", "name": "[v2,1/2] power: fix power management env detection", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a3b7dc814958e34cb724104dde35ebca9d81dc13", "submitter": { "id": 4, "url": "http://patchwork.dpdk.org/api/people/4/?format=api", "name": "Burakov, Anatoly", "email": "anatoly.burakov@intel.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/42bebf7cebd2b635a60b626faf605df6d8a277c1.1594652063.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 11001, "url": "http://patchwork.dpdk.org/api/series/11001/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=11001", "date": "2020-07-13T14:54:27", "name": "[v2,1/2] power: fix power management env detection", "version": 2, "mbox": "http://patchwork.dpdk.org/series/11001/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/73952/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/73952/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 270EFA0540;\n\tMon, 13 Jul 2020 16:54:37 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DE4201D8DB;\n\tMon, 13 Jul 2020 16:54:36 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 5F2ED1D6BF\n for <dev@dpdk.org>; Mon, 13 Jul 2020 16:54:35 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Jul 2020 07:54:33 -0700", "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.222.52])\n by fmsmga008.fm.intel.com with ESMTP; 13 Jul 2020 07:54:29 -0700" ], "IronPort-SDR": [ "\n OZVaRAINZK8cQEMldzri+QJXAwy3zfMsUjJmdv8q6EQHpzaXpDvmH75P+Iiih4oZtXaHIh/GAp\n kFEzigNU/ALg==", "\n u7PjFkWEAY6/FNR7HbpIGNzm2fBaObOml/GTBXYDOC6koWwxx8YBAwgO4Y09PqzWkJ3JiHq61r\n Em0Hx11pl4/g==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9681\"; a=\"150080048\"", "E=Sophos;i=\"5.75,347,1589266800\"; d=\"scan'208\";a=\"150080048\"", "E=Sophos;i=\"5.75,347,1589266800\"; d=\"scan'208\";a=\"269738465\"" ], "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": "David Hunt <david.hunt@intel.com>,\n\treshma.pattan@intel.com", "Date": "Mon, 13 Jul 2020 15:54:27 +0100", "Message-Id": "\n <42bebf7cebd2b635a60b626faf605df6d8a277c1.1594652063.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "\n <c568269db57a81ab8fecac06f81c1054f6439100.1594642553.git.anatoly.burakov@intel.com>", "References": "\n <c568269db57a81ab8fecac06f81c1054f6439100.1594642553.git.anatoly.burakov@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 1/2] power: fix power management env detection", "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": "Anything coming from sysfs has a newline at the end. Cut it off before\ncomparing the strings.\n\nFixes: 20ab67608a39 (\"power: add environment capability probing\")\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nAcked-by: David Hunt <david.hunt@intel.com>\n---\n lib/librte_power/power_common.c | 8 ++++++++\n 1 file changed, 8 insertions(+)", "diff": "diff --git a/lib/librte_power/power_common.c b/lib/librte_power/power_common.c\nindex 59023d986b..22b016ca9d 100644\n--- a/lib/librte_power/power_common.c\n+++ b/lib/librte_power/power_common.c\n@@ -15,6 +15,7 @@ int\n cpufreq_check_scaling_driver(const char *driver_name)\n {\n \tunsigned int lcore_id = 0; /* always check core 0 */\n+\tsize_t end_idx;\n \tchar fullpath[PATH_MAX];\n \tchar readbuf[PATH_MAX];\n \tchar *s;\n@@ -39,6 +40,13 @@ cpufreq_check_scaling_driver(const char *driver_name)\n \tif (s == NULL)\n \t\treturn 0;\n \n+\t/* when read from sysfs, driver name has an extra newline at the end */\n+\tend_idx = strnlen(readbuf, sizeof(readbuf));\n+\t/* prevent underflow if len is zero */\n+\tif (end_idx > 0)\n+\t\tend_idx--;\n+\treadbuf[end_idx] = '\\0';\n+\n \t/* does the driver name match? */\n \tif (strncmp(readbuf, driver_name, sizeof(readbuf)) != 0)\n \t\treturn 0;\n", "prefixes": [ "v2", "1/2" ] }{ "id": 73952, "url": "