get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 447,
    "url": "https://patches.dpdk.org/api/patches/447/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1411410879-28872-10-git-send-email-alan.carew@intel.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": "<1411410879-28872-10-git-send-email-alan.carew@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1411410879-28872-10-git-send-email-alan.carew@intel.com",
    "date": "2014-09-22T18:34:38",
    "name": "[dpdk-dev,09/10] VM Power Management Unit Tests(Guest)",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e0489e5053166c06c26cc6c996dac55db63e6b78",
    "submitter": {
        "id": 72,
        "url": "https://patches.dpdk.org/api/people/72/?format=api",
        "name": "Alan Carew",
        "email": "alan.carew@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1411410879-28872-10-git-send-email-alan.carew@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/447/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/447/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 4A310B3C9;\n\tMon, 22 Sep 2014 20:29:48 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id A8E2E68B8\n\tfor <dev@dpdk.org>; Mon, 22 Sep 2014 20:29:40 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga101.jf.intel.com with ESMTP; 22 Sep 2014 11:35:31 -0700",
            "from sie-lab-212-143.ir.intel.com (HELO\n\tsilpixa00385294.ir.intel.com) ([10.237.212.143])\n\tby orsmga002.jf.intel.com with ESMTP; 22 Sep 2014 11:35:30 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,573,1406617200\"; d=\"scan'208\";a=\"606714598\"",
        "From": "Alan Carew <alan.carew@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 22 Sep 2014 19:34:38 +0100",
        "Message-Id": "<1411410879-28872-10-git-send-email-alan.carew@intel.com>",
        "X-Mailer": "git-send-email 1.9.3",
        "In-Reply-To": "<1411410879-28872-1-git-send-email-alan.carew@intel.com>",
        "References": "<1411410879-28872-1-git-send-email-alan.carew@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 09/10] VM Power Management Unit Tests(Guest)",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Signed-off-by: Alan Carew <alan.carew@intel.com>\n---\n app/test/Makefile         |   1 +\n app/test/autotest_data.py |  13 +++\n app/test/test_power_vm.c  | 215 ++++++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 229 insertions(+)\n create mode 100644 app/test/test_power_vm.c",
    "diff": "diff --git a/app/test/Makefile b/app/test/Makefile\nindex 37a3772..39dd08e 100644\n--- a/app/test/Makefile\n+++ b/app/test/Makefile\n@@ -120,6 +120,7 @@ endif\n SRCS-$(CONFIG_RTE_LIBRTE_METER) += test_meter.c\n SRCS-$(CONFIG_RTE_LIBRTE_KNI) += test_kni.c\n SRCS-$(CONFIG_RTE_LIBRTE_POWER) += test_power.c\n+SRCS-$(CONFIG_RTE_LIBRTE_POWER_VM) += test_power_vm.c\n SRCS-y += test_common.c\n SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += test_ivshmem.c\n \ndiff --git a/app/test/autotest_data.py b/app/test/autotest_data.py\nindex 878c72e..5c6b60b 100644\n--- a/app/test/autotest_data.py\n+++ b/app/test/autotest_data.py\n@@ -425,6 +425,19 @@ non_parallel_test_group_list = [\n \t]\n },\n {\n+\t\"Prefix\" :      \"power_vm\",\n+\t\"Memory\" :      \"512\",\n+\t\"Tests\" :\n+\t[\n+\t\t{\n+\t\t \"Name\" :       \"Power VM  autotest\",\n+\t\t \"Command\" :    \"power_vm_autotest\",\n+\t\t \"Func\" :       default_autotest,\n+\t\t \"Report\" :     None,\n+\t\t},\n+\t]\n+},\n+{\n \t\"Prefix\" :\t\"lpm6\",\n \t\"Memory\" :\t\"512\",\n \t\"Tests\" :\ndiff --git a/app/test/test_power_vm.c b/app/test/test_power_vm.c\nnew file mode 100644\nindex 0000000..176fbec\n--- /dev/null\n+++ b/app/test/test_power_vm.c\n@@ -0,0 +1,215 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#include <stdio.h>\n+#include <stdint.h>\n+#include <unistd.h>\n+#include <limits.h>\n+#include <string.h>\n+\n+#include \"test.h\"\n+\n+#include <rte_power.h>\n+\n+#define TEST_POWER_VM_LCORE_ID      0U\n+#define TEST_POWER_VM_LCORE_INVALID 64U\n+\n+static int\n+test_power_vm(void)\n+{\n+\tint ret;\n+\n+\t/* Test initialisation of invalid lcore */\n+\tret = rte_power_init(TEST_POWER_VM_LCORE_INVALID);\n+\tif (ret != -1) {\n+\t\tprintf(\"rte_power_init unexpectedly succeeded on an invalid lcore %u\\n\",\n+\t\t\t\tTEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test initialisation of previously initialised lcore */\n+\tret = rte_power_init(TEST_POWER_VM_LCORE_ID);\n+\tif (ret != 0) {\n+\t\tprintf(\"rte_power_init unexpectedly failed on valid lcore %u,\"\n+\t\t\t\t\"please ensure that the environment has been configured \"\n+\t\t\t\t\"correctly and test application is running on a VM\\n\",\n+\t\t\t\tTEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\tret = rte_power_init(TEST_POWER_VM_LCORE_ID);\n+\tif (ret == 0) {\n+\t\tprintf(\"rte_power_init unexpectedly succeeded on calling init twice on\"\n+\t\t\t\t\"lcore %u\\n\", TEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency up of invalid lcore */\n+\tret = rte_power_freq_up(TEST_POWER_VM_LCORE_INVALID);\n+\tif (ret == 0) {\n+\t\tprintf(\"rte_power_freq_up unexpectedly succeeded on invalid lcore %u\\n\",\n+\t\t\t\tTEST_POWER_VM_LCORE_INVALID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency down of invalid lcore */\n+\tret = rte_power_freq_down(TEST_POWER_VM_LCORE_INVALID);\n+\tif (ret == 0) {\n+\t\tprintf(\"rte_power_freq_down unexpectedly succeeded on invalid lcore \"\n+\t\t\t\t\"%u\\n\", TEST_POWER_VM_LCORE_INVALID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency min of invalid lcore */\n+\tret = rte_power_freq_min(TEST_POWER_VM_LCORE_INVALID);\n+\tif (ret == 0) {\n+\t\tprintf(\"rte_power_freq_min unexpectedly succeeded on invalid lcore \"\n+\t\t\t\t\"%u\\n\", TEST_POWER_VM_LCORE_INVALID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency max of invalid lcore */\n+\tret = rte_power_freq_max(TEST_POWER_VM_LCORE_INVALID);\n+\tif (ret == 0) {\n+\t\tprintf(\"rte_power_freq_max unexpectedly succeeded on invalid lcore \"\n+\t\t\t\t\"%u\\n\", TEST_POWER_VM_LCORE_INVALID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency up of valid lcore */\n+\tret = rte_power_freq_up(TEST_POWER_VM_LCORE_ID);\n+\tif (ret != 0) {\n+\t\tprintf(\"rte_power_freq_up unexpectedly failed on valid lcore %u\\n\",\n+\t\t\t\tTEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency down of valid lcore */\n+\tret = rte_power_freq_down(TEST_POWER_VM_LCORE_ID);\n+\tif (ret != 0) {\n+\t\tprintf(\"rte_power_freq_down unexpectedly failed on valid lcore \"\n+\t\t\t\t\"%u\\n\", TEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency min of valid lcore */\n+\tret = rte_power_freq_min(TEST_POWER_VM_LCORE_ID);\n+\tif (ret != 0) {\n+\t\tprintf(\"rte_power_freq_min unexpectedly failed on valid lcore \"\n+\t\t\t\t\"%u\\n\", TEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency max of valid lcore */\n+\tret = rte_power_freq_max(TEST_POWER_VM_LCORE_ID);\n+\tif (ret != 0) {\n+\t\tprintf(\"rte_power_freq_max unexpectedly failed on valid lcore \"\n+\t\t\t\t\"%u\\n\", TEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test unsupported rte_power_freqs */\n+\tret = rte_power_freqs(TEST_POWER_VM_LCORE_ID, NULL, 0);\n+\tif (ret != -ENOTSUP) {\n+\t\tprintf(\"rte_power_freqs did not return the expected -ENOTSUP(%d) but \"\n+\t\t\t\t\"returned %d\\n\", -ENOTSUP, ret);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test unsupported rte_power_get_freq */\n+\tret = rte_power_get_freq(TEST_POWER_VM_LCORE_ID);\n+\tif (ret != -ENOTSUP) {\n+\t\tprintf(\"rte_power_get_freq did not return the expected -ENOTSUP(%d) but\"\n+\t\t\t\t\" returned %d for lcore %u\\n\",\n+\t\t\t\t-ENOTSUP, ret, TEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test unsupported rte_power_set_freq */\n+\tret = rte_power_set_freq(TEST_POWER_VM_LCORE_ID, 0);\n+\tif (ret != -ENOTSUP) {\n+\t\tprintf(\"rte_power_set_freq did not return the expected -ENOTSUP(%d) but\"\n+\t\t\t\t\" returned %d for lcore %u\\n\",\n+\t\t\t\t-ENOTSUP, ret, TEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test removing of an lcore */\n+\tret = rte_power_exit(TEST_POWER_VM_LCORE_ID);\n+\tif (ret != 0) {\n+\t\tprintf(\"rte_power_exit unexpectedly failed on valid lcore %u,\"\n+\t\t\t\t\"please ensure that the environment has been configured \"\n+\t\t\t\t\"correctly\\n\", TEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency up of previously removed lcore */\n+\tret = rte_power_freq_up(TEST_POWER_VM_LCORE_ID);\n+\tif (ret == 0) {\n+\t\tprintf(\"rte_power_freq_up unexpectedly succeeded on a removed \"\n+\t\t\t\t\"lcore %u\\n\", TEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency down of previously removed lcore */\n+\tret = rte_power_freq_down(TEST_POWER_VM_LCORE_ID);\n+\tif (ret == 0) {\n+\t\tprintf(\"rte_power_freq_down unexpectedly succeeded on a removed \"\n+\t\t\t\t\"lcore %u\\n\", TEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency min of previously removed lcore */\n+\tret = rte_power_freq_min(TEST_POWER_VM_LCORE_ID);\n+\tif (ret == 0) {\n+\t\tprintf(\"rte_power_freq_min unexpectedly succeeded on a removed \"\n+\t\t\t\t\"lcore %u\\n\", TEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Test frequency max of previously removed lcore */\n+\tret = rte_power_freq_max(TEST_POWER_VM_LCORE_ID);\n+\tif (ret == 0) {\n+\t\tprintf(\"rte_power_freq_max unexpectedly succeeded on a removed \"\n+\t\t\t\t\"lcore %u\\n\", TEST_POWER_VM_LCORE_ID);\n+\t\treturn -1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static struct test_command power_vm_cmd = {\n+    .command = \"power_vm_autotest\",\n+    .callback = test_power_vm,\n+};\n+REGISTER_TEST_COMMAND(power_vm_cmd);\n+\n",
    "prefixes": [
        "dpdk-dev",
        "09/10"
    ]
}