get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41365,
    "url": "http://patches.dpdk.org/api/patches/41365/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180621132414.39047-8-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": "<20180621132414.39047-8-david.hunt@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180621132414.39047-8-david.hunt@intel.com",
    "date": "2018-06-21T13:24:13",
    "name": "[v2,7/8] examples/vm_power: add branch ratio policy type",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3ad47ea46666d2864cd33a2e4a90d76eea29bf4c",
    "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/20180621132414.39047-8-david.hunt@intel.com/mbox/",
    "series": [
        {
            "id": 193,
            "url": "http://patches.dpdk.org/api/series/193/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=193",
            "date": "2018-06-21T13:24:10",
            "name": "examples/vm_power: 100% Busy Polling",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/193/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41365/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41365/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0E4671BB72;\n\tThu, 21 Jun 2018 15:25:22 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id BB5771B916\n\tfor <dev@dpdk.org>; Thu, 21 Jun 2018 15:25:07 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t21 Jun 2018 06:25:01 -0700",
            "from silpixa00399952.ir.intel.com (HELO\n\tsilpixa00399952.ger.corp.intel.com) ([10.237.223.64])\n\tby orsmga002.jf.intel.com with ESMTP; 21 Jun 2018 06:24:54 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,252,1526367600\"; d=\"scan'208\";a=\"68839797\"",
        "From": "David Hunt <david.hunt@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "david.hunt@intel.com",
        "Date": "Thu, 21 Jun 2018 14:24:13 +0100",
        "Message-Id": "<20180621132414.39047-8-david.hunt@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20180621132414.39047-1-david.hunt@intel.com>",
        "References": "<20180607073705.32895-2-david.hunt@intel.com>\n\t<20180621132414.39047-1-david.hunt@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 7/8] examples/vm_power: add branch ratio\n\tpolicy type",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add the capability for the vm_power_manager to receive\na policy of type BRANCH_RATIO. This will add any vcpus\nin the policy to the oob monitoring thread.\n\nSigned-off-by: David Hunt <david.hunt@intel.com>\n---\n examples/vm_power_manager/channel_monitor.c | 23 +++++++++++++++++++--\n lib/librte_power/channel_commands.h         |  3 ++-\n 2 files changed, 23 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c\nindex 73bddd993..7fa47ba97 100644\n--- a/examples/vm_power_manager/channel_monitor.c\n+++ b/examples/vm_power_manager/channel_monitor.c\n@@ -27,6 +27,7 @@\n #include \"channel_commands.h\"\n #include \"channel_manager.h\"\n #include \"power_manager.h\"\n+#include \"oob_monitor.h\"\n \n #define RTE_LOGTYPE_CHANNEL_MONITOR RTE_LOGTYPE_USER1\n \n@@ -92,6 +93,10 @@ get_pcpu_to_control(struct policy *pol)\n \tstruct vm_info info;\n \tint pcpu, count;\n \tuint64_t mask_u64b;\n+\tstruct core_info *ci;\n+\tint ret;\n+\n+\tci = get_core_info();\n \n \tRTE_LOG(INFO, CHANNEL_MONITOR, \"Looking for pcpu for %s\\n\",\n \t\t\tpol->pkt.vm_name);\n@@ -100,8 +105,22 @@ get_pcpu_to_control(struct policy *pol)\n \tfor (count = 0; count < pol->pkt.num_vcpu; count++) {\n \t\tmask_u64b = info.pcpu_mask[pol->pkt.vcpu_to_control[count]];\n \t\tfor (pcpu = 0; mask_u64b; mask_u64b &= ~(1ULL << pcpu++)) {\n-\t\t\tif ((mask_u64b >> pcpu) & 1)\n-\t\t\t\tpol->core_share[count].pcpu = pcpu;\n+\t\t\tif ((mask_u64b >> pcpu) & 1) {\n+\t\t\t\tif (pol->pkt.policy_to_use == BRANCH_RATIO) {\n+\t\t\t\t\tci->cd[pcpu].oob_enabled = 1;\n+\t\t\t\t\tret = add_core_to_monitor(pcpu);\n+\t\t\t\t\tif (ret == 0)\n+\t\t\t\t\t\tprintf(\"Monitoring pcpu %d via Branch Ratio\\n\",\n+\t\t\t\t\t\t\t\tpcpu);\n+\t\t\t\t\telse\n+\t\t\t\t\t\tprintf(\"Failed to start OOB Monitoring pcpu %d\\n\",\n+\t\t\t\t\t\t\t\tpcpu);\n+\n+\t\t\t\t} else {\n+\t\t\t\t\tpol->core_share[count].pcpu = pcpu;\n+\t\t\t\t\tprintf(\"Monitoring pcpu %d\\n\", pcpu);\n+\t\t\t\t}\n+\t\t\t}\n \t\t}\n \t}\n }\ndiff --git a/lib/librte_power/channel_commands.h b/lib/librte_power/channel_commands.h\nindex 5e8b4ab5d..ee638eefa 100644\n--- a/lib/librte_power/channel_commands.h\n+++ b/lib/librte_power/channel_commands.h\n@@ -48,7 +48,8 @@ enum workload {HIGH, MEDIUM, LOW};\n enum policy_to_use {\n \tTRAFFIC,\n \tTIME,\n-\tWORKLOAD\n+\tWORKLOAD,\n+\tBRANCH_RATIO\n };\n \n struct traffic {\n",
    "prefixes": [
        "v2",
        "7/8"
    ]
}