Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/92030/?format=api
http://patches.dpdk.org/api/patches/92030/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210422144030.16746-1-david.hunt@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": "<20210422144030.16746-1-david.hunt@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210422144030.16746-1-david.hunt@intel.com", "date": "2021-04-22T14:40:27", "name": "[v1,1/4] test/power: fix check for cpu frequency", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "dd0fc29bcb22790e0011a67e912715e8c0d8d110", "submitter": { "id": 342, "url": "http://patches.dpdk.org/api/people/342/?format=api", "name": "Hunt, David", "email": "david.hunt@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/20210422144030.16746-1-david.hunt@intel.com/mbox/", "series": [ { "id": 16610, "url": "http://patches.dpdk.org/api/series/16610/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16610", "date": "2021-04-22T14:40:27", "name": "[v1,1/4] test/power: fix check for cpu frequency", "version": 1, "mbox": "http://patches.dpdk.org/series/16610/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/92030/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/92030/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 C408AA0548;\n\tThu, 22 Apr 2021 16:40:40 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 921E441D91;\n\tThu, 22 Apr 2021 16:40:40 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id 1AC0C41C9D;\n Thu, 22 Apr 2021 16:40:38 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Apr 2021 07:40:35 -0700", "from silpixa00399952.ir.intel.com (HELO\n silpixa00399952.ger.corp.intel.com) ([10.237.222.38])\n by FMSMGA003.fm.intel.com with ESMTP; 22 Apr 2021 07:40:34 -0700" ], "IronPort-SDR": [ "\n HCj0/zsp1fkbG+mlscpsBYQQyD9nxGNXzO/XIAhv03wF3rKsqubwM0HsHW0yWMmg6d9mVRCMMY\n gfpWVwggOZCQ==", "\n IQ3c7t0hvunniWJmrZ/iIwgJlndNeuJ0aKiSsxcRSqCk/qry+Id5JGTHeYOJpTJNDRp0rqT8OX\n BiiRkZuvf+hw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,9962\"; a=\"192709701\"", "E=Sophos;i=\"5.82,242,1613462400\"; d=\"scan'208\";a=\"192709701\"", "E=Sophos;i=\"5.82,242,1613462400\"; d=\"scan'208\";a=\"453273986\"" ], "X-ExtLoop1": "1", "From": "David Hunt <david.hunt@intel.com>", "To": "dev@dpdk.org", "Cc": "david.hunt@intel.com,\n\tstable@dpdk.org", "Date": "Thu, 22 Apr 2021 15:40:27 +0100", "Message-Id": "<20210422144030.16746-1-david.hunt@intel.com>", "X-Mailer": "git-send-email 2.17.1", "Subject": "[dpdk-dev] [PATCH v1 1/4] test/power: fix check for cpu frequency", "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": "Different drivers present the current cpu core frequency in different\nsysfs iles. Some present it in cpuinfo_cur_freq, some in scaling_cur_freq,\nand some actually present it in both.\n\nThis patch attempts to open one, if that fails, tries the other.\n\nFixes: d550a8cc31f3 (\"app/test: enhance power manager unit tests\")\nCc: stable@dpdk.org\n\nSigned-off-by: David Hunt <david.hunt@intel.com>\n---\n app/test/test_power_cpufreq.c | 15 ++++++++++++---\n 1 file changed, 12 insertions(+), 3 deletions(-)", "diff": "diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c\nindex f753d24ac5..52f58ef8b2 100644\n--- a/app/test/test_power_cpufreq.c\n+++ b/app/test/test_power_cpufreq.c\n@@ -39,8 +39,10 @@ test_power_caps(void)\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+#define TEST_POWER_SYSFILE_CPUINFO_FREQ \\\n \t\"/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_cur_freq\"\n+#define TEST_POWER_SYSFILE_SCALING_FREQ \\\n+\t\"/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq\"\n \n static uint32_t total_freq_num;\n static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX];\n@@ -58,12 +60,19 @@ check_cur_freq(unsigned lcore_id, uint32_t idx)\n \tint i;\n \n \tif (snprintf(fullpath, sizeof(fullpath),\n-\t\tTEST_POWER_SYSFILE_CUR_FREQ, lcore_id) < 0) {\n+\t\tTEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) {\n \t\treturn 0;\n \t}\n \tf = fopen(fullpath, \"r\");\n \tif (f == NULL) {\n-\t\treturn 0;\n+\t\tif (snprintf(fullpath, sizeof(fullpath),\n+\t\t\tTEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) {\n+\t\t\treturn 0;\n+\t\t}\n+\t\tf = fopen(fullpath, \"r\");\n+\t\tif (f == NULL) {\n+\t\t\treturn 0;\n+\t\t}\n \t}\n \tfor (i = 0; i < MAX_LOOP; i++) {\n \t\tfflush(f);\n", "prefixes": [ "v1", "1/4" ] }{ "id": 92030, "url": "