get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 91538,
    "url": "https://patches.dpdk.org/api/patches/91538/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210415055930.3899-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": "<20210415055930.3899-3-richael.zhuang@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210415055930.3899-3-richael.zhuang@arm.com",
    "date": "2021-04-15T05:59:30",
    "name": "[v5,2/2] test/power: round cpuinfo cur freq value in cpufreq autotest",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a8c8f88fc0cf416f1869ff24d76177ed87a7e04d",
    "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/20210415055930.3899-3-richael.zhuang@arm.com/mbox/",
    "series": [
        {
            "id": 16393,
            "url": "https://patches.dpdk.org/api/series/16393/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16393",
            "date": "2021-04-15T05:59:28",
            "name": "test/power: fix bugs in cpufreq test",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/16393/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/91538/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/91538/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 B66D7A0A0C;\n\tThu, 15 Apr 2021 07:59:56 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4CF7116201F;\n\tThu, 15 Apr 2021 07:59:52 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 79BAC16201B;\n Thu, 15 Apr 2021 07:59:51 +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 EBA2811B3;\n Wed, 14 Apr 2021 22:59:50 -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 D8F8A3F792;\n Wed, 14 Apr 2021 22:59:48 -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:59:30 +0800",
        "Message-Id": "<20210415055930.3899-3-richael.zhuang@arm.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20210415055930.3899-1-richael.zhuang@arm.com>",
        "References": "<20210407074636.26891-2-richael.zhuang@arm.com>\n <20210415055930.3899-1-richael.zhuang@arm.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v5 2/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 d47b3e0a1..f753d24ac 100644\n--- a/app/test/test_power_cpufreq.c\n+++ b/app/test/test_power_cpufreq.c\n@@ -35,6 +35,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@@ -67,7 +71,17 @@ check_cur_freq(unsigned lcore_id, uint32_t idx)\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\t/* convert the frequency to nearest 100000 value\n+\t\t * Ex: if cur_freq=1396789 then freq_conv=1400000\n+\t\t * Ex: if cur_freq=800030 then freq_conv=800000\n+\t\t */\n+\t\tunsigned int freq_conv = 0;\n+\t\tfreq_conv = (cur_freq + TEST_FREQ_ROUNDING_DELTA)\n+\t\t\t\t\t/ TEST_ROUND_FREQ_TO_N_100000;\n+\t\tfreq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;\n+\n+\t\tret = (freqs[idx] == freq_conv ? 0 : -1);\n \n \t\tif (ret == 0)\n \t\t\tbreak;\n",
    "prefixes": [
        "v5",
        "2/2"
    ]
}