get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 48040,
    "url": "http://patchwork.dpdk.org/api/patches/48040/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/07b7c67be5adc770b028212ef8918d4ae8f11255.1542127066.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<07b7c67be5adc770b028212ef8918d4ae8f11255.1542127066.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/07b7c67be5adc770b028212ef8918d4ae8f11255.1542127066.git.anatoly.burakov@intel.com",
    "date": "2018-11-13T16:42:09",
    "name": "devbind: don't display non-existent device categories",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "41121bc1b44c44db944ad1d4aead476240f50d4c",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/07b7c67be5adc770b028212ef8918d4ae8f11255.1542127066.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 2389,
            "url": "http://patchwork.dpdk.org/api/series/2389/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=2389",
            "date": "2018-11-13T16:42:09",
            "name": "devbind: don't display non-existent device categories",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/2389/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/48040/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/48040/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 D9DF1493D;\n\tTue, 13 Nov 2018 17:42:14 +0100 (CET)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id 1458C493D\n\tfor <dev@dpdk.org>; Tue, 13 Nov 2018 17:42:12 +0100 (CET)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Nov 2018 08:42:12 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga006.jf.intel.com with ESMTP; 13 Nov 2018 08:42:10 -0800",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\twADGg9oU010943; Tue, 13 Nov 2018 16:42:09 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id wADGg9q9020891;\n\tTue, 13 Nov 2018 16:42:09 GMT",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id wADGg940020887;\n\tTue, 13 Nov 2018 16:42:09 GMT"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.56,228,1539673200\"; d=\"scan'208\";a=\"90803906\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "david.hunt@intel.com, john.mcnamara@intel.com, thomas@monjalon.net,\n\tferruh.yigit@intel.com",
        "Date": "Tue, 13 Nov 2018 16:42:09 +0000",
        "Message-Id": "<07b7c67be5adc770b028212ef8918d4ae8f11255.1542127066.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "Subject": "[dpdk-dev] [PATCH] devbind: don't display non-existent device\n\tcategories",
        "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": "If there aren't any devices of a particular category on user's\nsystem, we still display them, which is bad for usability. Fix\ndevbind to not print out a category unless there are devices in\nit.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n usertools/dpdk-devbind.py | 27 ++++++++++++++++++++-------\n 1 file changed, 20 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py\nindex 7d564634c..9f190e227 100755\n--- a/usertools/dpdk-devbind.py\n+++ b/usertools/dpdk-devbind.py\n@@ -546,14 +546,27 @@ def show_device_status(devices_type, device_name):\n             else:\n                 kernel_drv.append(devices[d])\n \n+    n_devs = len(dpdk_drv) + len(kernel_drv) + len(no_drv)\n+\n+    # don't bother displaying anything if there are no devices\n+    if n_devs == 0:\n+        msg = \"No '%s' devices detected\" % device_name\n+\tprint(\"\")\n+\tprint(msg)\n+\tprint(\"\".join('=' * len(msg)))\n+        return\n+\n     # print each category separately, so we can clearly see what's used by DPDK\n-    display_devices(\"%s devices using DPDK-compatible driver\" % device_name,\n-                    dpdk_drv, \"drv=%(Driver_str)s unused=%(Module_str)s\")\n-    display_devices(\"%s devices using kernel driver\" % device_name, kernel_drv,\n-                    \"if=%(Interface)s drv=%(Driver_str)s \"\n-                    \"unused=%(Module_str)s %(Active)s\")\n-    display_devices(\"Other %s devices\" % device_name, no_drv,\n-                    \"unused=%(Module_str)s\")\n+    if len(dpdk_drv) != 0:\n+        display_devices(\"%s devices using DPDK-compatible driver\" % device_name,\n+                        dpdk_drv, \"drv=%(Driver_str)s unused=%(Module_str)s\")\n+    if len(kernel_drv) != 0:\n+        display_devices(\"%s devices using kernel driver\" % device_name, kernel_drv,\n+                        \"if=%(Interface)s drv=%(Driver_str)s \"\n+                        \"unused=%(Module_str)s %(Active)s\")\n+    if len(no_drv) != 0:\n+        display_devices(\"Other %s devices\" % device_name, no_drv,\n+                        \"unused=%(Module_str)s\")\n \n def show_status():\n     '''Function called when the script is passed the \"--status\" option.\n",
    "prefixes": []
}