get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/91535/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 91535,
    "url": "https://patches.dpdk.org/api/patches/91535/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210415053923.3447-3-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-3-richael.zhuang@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210415053923.3447-3-richael.zhuang@arm.com",
    "date": "2021-04-15T05:39:23",
    "name": "[v4,2/2] test/power: add delay before checking cpuinfo cur freq",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "19e2522a0e139f03d2d354109c5789dbb99c388e",
    "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-3-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/91535/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/91535/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 D517EA0A0C;\n\tThu, 15 Apr 2021 07:39:50 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 11F18161FE7;\n\tThu, 15 Apr 2021 07:39:48 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 600D3161FC3;\n Thu, 15 Apr 2021 07:39:47 +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 CEE2711B3;\n Wed, 14 Apr 2021 22:39:46 -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 BAAD43F792;\n Wed, 14 Apr 2021 22:39:44 -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:23 +0800",
        "Message-Id": "<20210415053923.3447-3-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 2/2] test/power: add delay before checking\n cpuinfo cur freq",
        "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": "For some platforms the newly-set frequency may not be effective\nimmediately. If we didn't get the right value from cpuinfo_cur_freq\nimmediately, add 10ms delay each time before rechecking until\ntimeout.\n\nFrom our test, for some arm platforms, it requires up to 700ms when\ngoing from a minimum to a maximum frequency. And it's not the\ndriver/software issue.\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 | 25 ++++++++++++++++++++++---\n 1 file changed, 22 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c\nindex 1f4d8bb05..25249ecf5 100644\n--- a/app/test/test_power_cpufreq.c\n+++ b/app/test/test_power_cpufreq.c\n@@ -8,6 +8,7 @@\n #include <limits.h>\n #include <string.h>\n #include <inttypes.h>\n+#include <rte_cycles.h>\n \n #include \"test.h\"\n \n@@ -48,11 +49,13 @@ static int\n check_cur_freq(unsigned lcore_id, uint32_t idx)\n {\n #define TEST_POWER_CONVERT_TO_DECIMAL 10\n+#define MAX_LOOP 100\n \tFILE *f;\n \tchar fullpath[PATH_MAX];\n \tchar buf[BUFSIZ];\n \tuint32_t cur_freq;\n \tint ret = -1;\n+\tint i;\n \n \tif (snprintf(fullpath, sizeof(fullpath),\n \t\tTEST_POWER_SYSFILE_CUR_FREQ, lcore_id) < 0) {\n@@ -62,8 +65,24 @@ check_cur_freq(unsigned lcore_id, uint32_t idx)\n \tif (f == NULL) {\n \t\treturn 0;\n \t}\n-\tif (fgets(buf, sizeof(buf), f) == NULL) {\n-\t\tgoto fail_get_cur_freq;\n+\tfor (i = 0; i < MAX_LOOP; i++) {\n+\t\tfflush(f);\n+\t\tif (fgets(buf, sizeof(buf), f) == NULL)\n+\t\t\tgoto fail_all;\n+\n+\t\tcur_freq = strtoul(buf, NULL, TEST_POWER_CONVERT_TO_DECIMAL);\n+\t\tret = (freqs[idx] == cur_freq ? 0 : -1);\n+\n+\t\tif (ret == 0)\n+\t\t\tbreak;\n+\n+\t\tif (fseek(f, 0, SEEK_SET) < 0) {\n+\t\t\tprintf(\"Fail to set file position indicator to 0\\n\");\n+\t\t\tgoto fail_all;\n+\t\t}\n+\n+\t\t/* wait for the value to be updated */\n+\t\trte_delay_ms(10);\n \t}\n \tcur_freq = strtoul(buf, NULL, TEST_POWER_CONVERT_TO_DECIMAL);\n \n@@ -78,7 +97,7 @@ check_cur_freq(unsigned lcore_id, uint32_t idx)\n \n \tret = (freqs[idx] == freq_conv ? 0 : -1);\n \n-fail_get_cur_freq:\n+fail_all:\n \tfclose(f);\n \n \treturn ret;\n",
    "prefixes": [
        "v4",
        "2/2"
    ]
}