Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/91534/?format=api
https://patches.dpdk.org/api/patches/91534/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210415053923.3447-2-richael.zhuang@arm.com/", "project": { "id": 1, "url": "https://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": "<20210415053923.3447-2-richael.zhuang@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210415053923.3447-2-richael.zhuang@arm.com", "date": "2021-04-15T05:39:22", "name": "[v4,1/2] test/power: round cpuinfo cur freq value in cpufreq autotest", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "e87952f3a4a74ffa4561dbb17edf0a8a957a00fb", "submitter": { "id": 2178, "url": "https://patches.dpdk.org/api/people/2178/?format=api", "name": "Richael Zhuang", "email": "richael.zhuang@arm.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210415053923.3447-2-richael.zhuang@arm.com/mbox/", "series": [ { "id": 16392, "url": "https://patches.dpdk.org/api/series/16392/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16392", "date": "2021-04-15T05:39:21", "name": "test/power: fix bugs in cpufreq test", "version": 4, "mbox": "https://patches.dpdk.org/series/16392/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/91534/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/91534/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id A53CFA0A0C;\n\tThu, 15 Apr 2021 07:39:44 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 78B27161FD5;\n\tThu, 15 Apr 2021 07:39:44 +0200 (CEST)", "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 21C88161FD4;\n Thu, 15 Apr 2021 07:39:43 +0200 (CEST)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8658711B3;\n Wed, 14 Apr 2021 22:39:42 -0700 (PDT)", "from wls-arm-cavium06.shanghai.arm.com\n (wls-arm-cavium06.shanghai.arm.com [10.169.206.120])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 72FAF3F792;\n Wed, 14 Apr 2021 22:39:40 -0700 (PDT)" ], "From": "Richael Zhuang <richael.zhuang@arm.com>", "To": "dev@dpdk.org", "Cc": "nd@arm.com, alan.carew@intel.com, stable@dpdk.org,\n David Hunt <david.hunt@intel.com>,\n Pablo de Lara <pablo.de.lara.guarch@intel.com>", "Date": "Thu, 15 Apr 2021 13:39:22 +0800", "Message-Id": "<20210415053923.3447-2-richael.zhuang@arm.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20210415053923.3447-1-richael.zhuang@arm.com>", "References": "<20210407074636.26891-2-richael.zhuang@arm.com>\n <20210415053923.3447-1-richael.zhuang@arm.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v4 1/2] test/power: round cpuinfo cur freq value\n in cpufreq autotest", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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": "The value in \"/sys/.../cpuinfo_cur_freq\" may not be exactly the\nsame as what was set. For example, if \"2400000\" is written to\n\"/sys/.../cpufreq/scaling_setspeed\" to set the frequency, then the\nvalue in \"/sys/.../cpuinfo_cur_freq\" may be \"2401222\". So need to\nround the value.\n\nFixes: ed7c51a6a680 (\"app/test: vm power management\")\nCc: alan.carew@intel.com\nCc: stable@dpdk.org\n\nSigned-off-by: Richael Zhuang <richael.zhuang@arm.com>\n---\n app/test/test_power_cpufreq.c | 16 +++++++++++++++-\n 1 file changed, 15 insertions(+), 1 deletion(-)", "diff": "diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c\nindex 731c6b4dc..1f4d8bb05 100644\n--- a/app/test/test_power_cpufreq.c\n+++ b/app/test/test_power_cpufreq.c\n@@ -34,6 +34,10 @@ test_power_caps(void)\n #define TEST_POWER_LCORE_INVALID ((unsigned)RTE_MAX_LCORE)\n #define TEST_POWER_FREQS_NUM_MAX ((unsigned)RTE_MAX_LCORE_FREQS)\n \n+/* macros used for rounding frequency to nearest 100000 */\n+#define TEST_FREQ_ROUNDING_DELTA 50000\n+#define TEST_ROUND_FREQ_TO_N_100000 100000\n+\n #define TEST_POWER_SYSFILE_CUR_FREQ \\\n \t\"/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_cur_freq\"\n \n@@ -62,7 +66,17 @@ check_cur_freq(unsigned lcore_id, uint32_t idx)\n \t\tgoto fail_get_cur_freq;\n \t}\n \tcur_freq = strtoul(buf, NULL, TEST_POWER_CONVERT_TO_DECIMAL);\n-\tret = (freqs[idx] == cur_freq ? 0 : -1);\n+\n+\t/* convert the frequency to nearest 100000 value\n+\t * Ex: if cur_freq=1396789 then freq_conv=1400000\n+\t * Ex: if cur_freq=800030 then freq_conv=800000\n+\t */\n+\tunsigned int freq_conv = 0;\n+\tfreq_conv = (cur_freq + TEST_FREQ_ROUNDING_DELTA)\n+\t\t\t\t/ TEST_ROUND_FREQ_TO_N_100000;\n+\tfreq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;\n+\n+\tret = (freqs[idx] == freq_conv ? 0 : -1);\n \n fail_get_cur_freq:\n \tfclose(f);\n", "prefixes": [ "v4", "1/2" ] }{ "id": 91534, "url": "