get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44514,
    "url": "http://patches.dpdk.org/api/patches/44514/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180910135107.6286-3-qi.z.zhang@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": "<20180910135107.6286-3-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180910135107.6286-3-qi.z.zhang@intel.com",
    "date": "2018-09-10T13:51:07",
    "name": "[RFC,v2,2/2] testpmd: enable async device reset",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5095917b27f22e6117d5329b5c3d220d5e7798b7",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180910135107.6286-3-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 1251,
            "url": "http://patches.dpdk.org/api/series/1251/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1251",
            "date": "2018-09-10T13:51:05",
            "name": "ethdev: claim device reset as async",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/1251/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44514/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44514/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 E8EC44CC3;\n\tMon, 10 Sep 2018 15:50:21 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id D0EF61B19\n\tfor <dev@dpdk.org>; Mon, 10 Sep 2018 15:50:16 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t10 Sep 2018 06:50:14 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby fmsmga005.fm.intel.com with ESMTP; 10 Sep 2018 06:50:13 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,355,1531810800\"; d=\"scan'208\";a=\"261342422\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "thomas@monjalon.net, konstantin.ananyev@intel.com,\n\tdeclan.doherty@intel.com, ferruh.yigit@intel.com",
        "Cc": "dev@dpdk.org, benjamin.h.shelton@intel.com, narender.vangati@intel.com, \n\tQi Zhang <qi.z.zhang@intel.com>",
        "Date": "Mon, 10 Sep 2018 21:51:07 +0800",
        "Message-Id": "<20180910135107.6286-3-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180910135107.6286-1-qi.z.zhang@intel.com>",
        "References": "<20180910135107.6286-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [RFC v2 2/2] testpmd: enable async device reset",
        "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": "rte_eth_dev_reset is claimed as an async API, so re-work\non the device reset handling.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n app/test-pmd/testpmd.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 49 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex ee48db2a3..8d4d7b4f9 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -1918,6 +1918,54 @@ close_port(portid_t pid)\n \tprintf(\"Done\\n\");\n }\n \n+static int reset_ret;\n+static int reset_done;\n+\n+static int\n+on_reset_complete(__rte_unused uint16_t port_id,\n+\t\t__rte_unused enum rte_eth_event_type event,\n+\t\t__rte_unused void *cb_arg,\n+\t\tvoid *ret_param)\n+{\n+\tRTE_ASSERT(event == RTE_ETH_EVENT_RESET_COMPLETE);\n+\n+\treset_ret = *(int *)ret_param;\n+\treset_done = 1;\n+\treturn 0;\n+}\n+\n+static int\n+do_dev_reset_sync(portid_t pid)\n+{\n+\tint ret;\n+\n+\tret = rte_eth_dev_callback_register(pid,\n+\t\t\tRTE_ETH_EVENT_RESET_COMPLETE,\n+\t\t\ton_reset_complete, NULL);\n+\n+\tif (ret) {\n+\t\tprintf(\"Fail to reigster callback function\\n\");\n+\t\treturn ret;\n+\t}\n+\n+\treset_done = 0;\n+\tret = rte_eth_dev_reset(pid);\n+\tif (ret)\n+\t\tgoto finish;\n+\n+\twhile (!reset_done)\n+\t\trte_delay_ms(10);\n+\n+\tret = reset_ret;\n+\n+finish:\n+\trte_eth_dev_callback_unregister(pid,\n+\t\t\tRTE_ETH_EVENT_RESET_COMPLETE,\n+\t\t\ton_reset_complete, NULL);\n+\n+\treturn ret;\n+}\n+\n void\n reset_port(portid_t pid)\n {\n@@ -1946,7 +1994,7 @@ reset_port(portid_t pid)\n \t\t\tcontinue;\n \t\t}\n \n-\t\tdiag = rte_eth_dev_reset(pi);\n+\t\tdiag = do_dev_reset_sync(pi);\n \t\tif (diag == 0) {\n \t\t\tport = &ports[pi];\n \t\t\tport->need_reconfig = 1;\n",
    "prefixes": [
        "RFC",
        "v2",
        "2/2"
    ]
}