get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 52745,
    "url": "http://patches.dpdk.org/api/patches/52745/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190412135431.3308-3-lukaszx.gosiewski@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": "<20190412135431.3308-3-lukaszx.gosiewski@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190412135431.3308-3-lukaszx.gosiewski@intel.com",
    "date": "2019-04-12T13:54:31",
    "name": "[v2,2/2] doc: update according to the fifo per core impl",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dd5dcd7c81b7d2c5c46420222a1a939efd6a450d",
    "submitter": {
        "id": 1281,
        "url": "http://patches.dpdk.org/api/people/1281/?format=api",
        "name": "Lukasz Gosiewski",
        "email": "lukaszx.gosiewski@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190412135431.3308-3-lukaszx.gosiewski@intel.com/mbox/",
    "series": [
        {
            "id": 4298,
            "url": "http://patches.dpdk.org/api/series/4298/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4298",
            "date": "2019-04-12T13:54:29",
            "name": "power: add fifo per core for JSON interface",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/4298/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/52745/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/52745/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 0835D1B0F8;\n\tSat, 13 Apr 2019 14:35:20 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id D286C1B11F\n\tfor <dev@dpdk.org>; Fri, 12 Apr 2019 15:56:47 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t12 Apr 2019 06:56:46 -0700",
            "from lgosiewx-mobl.ger.corp.intel.com ([10.103.104.80])\n\tby fmsmga002.fm.intel.com with ESMTP; 12 Apr 2019 06:56:45 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.60,341,1549958400\"; d=\"scan'208\";a=\"160799638\"",
        "From": "Lukasz Gosiewski <lukaszx.gosiewski@intel.com>",
        "To": "david.hunt@intel.com",
        "Cc": "dev@dpdk.org, lukaszx.krakowiak@intel.com,\n\tLukasz Gosiewski <lukaszx.gosiewski@intel.com>",
        "Date": "Fri, 12 Apr 2019 15:54:31 +0200",
        "Message-Id": "<20190412135431.3308-3-lukaszx.gosiewski@intel.com>",
        "X-Mailer": "git-send-email 2.21.0.windows.1",
        "In-Reply-To": "<20190412135431.3308-1-lukaszx.gosiewski@intel.com>",
        "References": "<20190408104518.21960-1-lukaszx.krakowiak@intel.com>\n\t<20190412135431.3308-1-lukaszx.gosiewski@intel.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "X-Mailman-Approved-At": "Sat, 13 Apr 2019 14:35:08 +0200",
        "Subject": "[dpdk-dev] [PATCH v2 2/2] doc: update according to the fifo per\n\tcore impl",
        "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": "From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>\n\nUpdated power management docs for fifo JSON API.\nRemoved from JSON API:\n* 'name'\n* 'resource_id'\n* 'core_list'\n\nSigned-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>\nSigned-off-by: Lukasz Gosiewski <lukaszx.gosiewski@intel.com>\n---\n .../sample_app_ug/vm_power_management.rst     | 53 ++++---------------\n 1 file changed, 11 insertions(+), 42 deletions(-)",
    "diff": "diff --git a/doc/guides/sample_app_ug/vm_power_management.rst b/doc/guides/sample_app_ug/vm_power_management.rst\nindex 14d432e78..7b2c78ffc 100644\n--- a/doc/guides/sample_app_ug/vm_power_management.rst\n+++ b/doc/guides/sample_app_ug/vm_power_management.rst\n@@ -380,9 +380,16 @@ parsing functionality will not be present in the app.\n \n Sending a command or policy to the power manager application is achieved by\n simply opening a fifo file, writing a JSON string to that fifo, and closing\n-the file.\n+the file. In actual implementation every core has own dedicated fifo[0..n],\n+where n is number of the last available core.\n+Having a dedicated fifo file per core allows using standard filesystem permissions\n+to ensure a given container can only write JSON commands into fifos it is allowed\n+to use.\n \n-The fifo is at /tmp/powermonitor/fifo\n+The fifo is at /tmp/powermonitor/fifo[0..n]\n+\n+For example all cmds put to the /tmp/powermonitor/fifo7, will have\n+effect only on CPU[7].\n \n The jason string can be a policy or instruction, and takes the following\n format:\n@@ -405,19 +412,6 @@ arrays, etc. Examples of policies follow later in this document. The allowed\n names and value types are as follows:\n \n \n-:Pair Name: \"name\"\n-:Description: Name of the VM or Host. Allows the parser to associate the\n-  policy with the relevant VM or Host OS.\n-:Type: string\n-:Values: any valid string\n-:Required: yes\n-:Example:\n-\n-    .. code-block:: javascript\n-\n-      \"name\", \"ubuntu2\"\n-\n-\n :Pair Name: \"command\"\n :Description: The type of packet we're sending to the power manager. We can be\n   creating or destroying a policy, or sending a direct command to adjust\n@@ -509,17 +503,6 @@ names and value types are as follows:\n \n     \"max_packet_thresh\": 500000\n \n-:Pair Name: \"core_list\"\n-:Description: The cores to which to apply the policy.\n-:Type: array of integers\n-:Values: array with list of virtual CPUs.\n-:Required: only policy CREATE/DESTROY\n-:Example:\n-\n-  .. code-block:: javascript\n-\n-    \"core_list\":[ 10, 11 ]\n-\n :Pair Name: \"workload\"\n :Description: When our policy is of type WORKLOAD, we need to specify how\n   heavy our workload is.\n@@ -566,17 +549,6 @@ names and value types are as follows:\n \n     \"unit\", \"SCALE_MAX\"\n \n-:Pair Name: \"resource_id\"\n-:Description: The core to which to apply the power command.\n-:Type: integer\n-:Values: valid core id for VM or host OS.\n-:Required: only POWER instruction\n-:Example:\n-\n-  .. code-block:: javascript\n-\n-    \"resource_id\": 10\n-\n JSON API Examples\n ~~~~~~~~~~~~~~~~~\n \n@@ -598,7 +570,6 @@ Profile destroy example:\n   .. code-block:: javascript\n \n     {\"profile\": {\n-      \"name\": \"ubuntu\",\n       \"command\": \"destroy\",\n     }}\n \n@@ -607,17 +578,15 @@ Power command example:\n   .. code-block:: javascript\n \n     {\"command\": {\n-      \"name\": \"ubuntu\",\n       \"unit\": \"SCALE_MAX\",\n-      \"resource_id\": 10\n     }}\n \n To send a JSON string to the Power Manager application, simply paste the\n-example JSON string into a text file and cat it into the fifo:\n+example JSON string into a text file and cat it into the proper fifo:\n \n   .. code-block:: console\n \n-    cat file.json >/tmp/powermonitor/fifo\n+    cat file.json >/tmp/powermonitor/fifo[0..n]\n \n The console of the Power Manager application should indicate the command that\n was just received via the fifo.\n",
    "prefixes": [
        "v2",
        "2/2"
    ]
}