get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 68010,
    "url": "http://patches.dpdk.org/api/patches/68010/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/854770a880777e7ad200481294a7aa5ac9a45f2d.1586361368.git.anatoly.burakov@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": "<854770a880777e7ad200481294a7aa5ac9a45f2d.1586361368.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/854770a880777e7ad200481294a7aa5ac9a45f2d.1586361368.git.anatoly.burakov@intel.com",
    "date": "2020-04-08T15:56:13",
    "name": "[1/2] l3fwd-power: exit if initializing power library failed",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a6348a8859a2d9140479112c9106a988f22dadff",
    "submitter": {
        "id": 4,
        "url": "http://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/854770a880777e7ad200481294a7aa5ac9a45f2d.1586361368.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 9254,
            "url": "http://patches.dpdk.org/api/series/9254/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9254",
            "date": "2020-04-08T15:56:13",
            "name": "[1/2] l3fwd-power: exit if initializing power library failed",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/9254/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/68010/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/68010/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D627AA0597;\n\tWed,  8 Apr 2020 17:56:18 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 316C61C0B4;\n\tWed,  8 Apr 2020 17:56:18 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by dpdk.org (Postfix) with ESMTP id 1CE4A1C065\n for <dev@dpdk.org>; Wed,  8 Apr 2020 17:56:16 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Apr 2020 08:56:15 -0700",
            "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.222.52])\n by FMSMGA003.fm.intel.com with ESMTP; 08 Apr 2020 08:56:15 -0700"
        ],
        "IronPort-SDR": [
            "\n V1HPHYfBnCp6Psx5Y8Pi+4IBT9snd1Sz4tcbeRpit7Y26+91hgmoJFzGafQ406Jvw7qO95scU0\n uFmF9MDo3exA==",
            "\n XY5xpi1vXPvjEEJ6eDeLGyQJ1s+y6LkVSiIABaKYPJfhPEsKksB4Cn1++FHnyDLA4Rgmamn15x\n UnPW7Fv9YhPQ=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.72,359,1580803200\"; d=\"scan'208\";a=\"297271506\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "David Hunt <david.hunt@intel.com>,\n\treshma.pattan@intel.com",
        "Date": "Wed,  8 Apr 2020 16:56:13 +0100",
        "Message-Id": "\n <854770a880777e7ad200481294a7aa5ac9a45f2d.1586361368.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH 1/2] l3fwd-power: exit if initializing power\n\tlibrary failed",
        "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 <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": "Currently, if power library initialization fails, only a log message is\ndisplayed. This is suboptimal for a number of reasons, but the main one\nis that telemetry mode does not depend on the power library and can\ntherefore run in environments where l3fwd-power would normally not run\ncorrectly (such as inside a VM). This will lead to attempts to\ndeinitialize the power library on exit, with a subsequent forced unclean\nshutdown of DPDK.\n\nFix this by only initializing the power library in modes that actually\nneed it, and change a log message to a failure to initialize.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n examples/l3fwd-power/main.c | 20 +++++++++++---------\n 1 file changed, 11 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c\nindex c7fe0ec034..0e5fe42a64 100644\n--- a/examples/l3fwd-power/main.c\n+++ b/examples/l3fwd-power/main.c\n@@ -2065,15 +2065,17 @@ static int check_ptype(uint16_t portid)\n static int\n init_power_library(void)\n {\n-\tint ret = 0, lcore_id;\n-\tfor (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {\n-\t\tif (rte_lcore_is_enabled(lcore_id)) {\n-\t\t\t/* init power management library */\n-\t\t\tret = rte_power_init(lcore_id);\n-\t\t\tif (ret)\n-\t\t\t\tRTE_LOG(ERR, POWER,\n+\tunsigned int lcore_id;\n+\tint ret = 0;\n+\n+\tRTE_LCORE_FOREACH(lcore_id) {\n+\t\t/* init power management library */\n+\t\tret = rte_power_init(lcore_id);\n+\t\tif (ret) {\n+\t\t\tRTE_LOG(ERR, POWER,\n \t\t\t\t\"Library initialization failed on core %u\\n\",\n \t\t\t\tlcore_id);\n+\t\t\treturn ret;\n \t\t}\n \t}\n \treturn ret;\n@@ -2224,8 +2226,8 @@ main(int argc, char **argv)\n \tif (ret < 0)\n \t\trte_exit(EXIT_FAILURE, \"Invalid L3FWD parameters\\n\");\n \n-\tif (init_power_library())\n-\t\tRTE_LOG(ERR, L3FWD_POWER, \"init_power_library failed\\n\");\n+\tif (app_mode != APP_MODE_TELEMETRY && init_power_library())\n+\t\trte_exit(EXIT_FAILURE, \"init_power_library failed\\n\");\n \n \tif (update_lcore_params() < 0)\n \t\trte_exit(EXIT_FAILURE, \"update_lcore_params failed\\n\");\n",
    "prefixes": [
        "1/2"
    ]
}