get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54457,
    "url": "https://patches.dpdk.org/api/patches/54457/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190606003520.29260-1-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "https://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": "<20190606003520.29260-1-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190606003520.29260-1-stephen@networkplumber.org",
    "date": "2019-06-06T00:35:20",
    "name": "bus/vmbus: skip non-network devices",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b27a38adebf6510e940cd6fdae26e6735e916ca2",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190606003520.29260-1-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 4919,
            "url": "https://patches.dpdk.org/api/series/4919/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=4919",
            "date": "2019-06-06T00:35:20",
            "name": "bus/vmbus: skip non-network devices",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/4919/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/54457/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/54457/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 870191B9E0;\n\tThu,  6 Jun 2019 02:35:27 +0200 (CEST)",
            "from mail-pg1-f193.google.com (mail-pg1-f193.google.com\n\t[209.85.215.193]) by dpdk.org (Postfix) with ESMTP id 8FAE91B9DE\n\tfor <dev@dpdk.org>; Thu,  6 Jun 2019 02:35:26 +0200 (CEST)",
            "by mail-pg1-f193.google.com with SMTP id e6so268426pgd.9\n\tfor <dev@dpdk.org>; Wed, 05 Jun 2019 17:35:26 -0700 (PDT)",
            "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\t22sm149241pje.15.2019.06.05.17.35.24\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 05 Jun 2019 17:35:24 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=50J7/V+gjxUl39iaY7J8iSQ55VcLnP4byqzs+H2Y7Go=;\n\tb=iZAHkd31LdaddgdyS82ZZUau/FUxzt6uOGFTx8KdhZ8oCns/PZZUMaq3vFUNQLUgin\n\t61cEQzmOFTxlb6s3NFiVLfzxj2b0t+cidrmqQDfzEEI6QW01btt/eKS5uF4Z7w6PBRgQ\n\tCl79BIYRBILq65A5lx3mOQ4qAXi+rtL+jU+C3pvh67UFs5RiauM13o1FgzChPVP5Ytmt\n\t+6CsA/ih5+2/EaO7yX+k0K4zOl8Jfl+X5DAc3Eg/u4V8R9p3xkzoKKXLiIj5Ouwzx6bM\n\tv4asjVgTxGwC20vKJdeBH++vH8UWdDKoyDFkYp3/X1BJY7cMa4oFNZ/V+D/Zbs42spiX\n\tR5cA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=50J7/V+gjxUl39iaY7J8iSQ55VcLnP4byqzs+H2Y7Go=;\n\tb=rDTehLgdXc9Zgp8t+Zu0283K8ubk3W2cybMs6PxuX0Mrz6OdMMicjsucP8jL+nCd2z\n\tTag5hd1LT2vpahDXqbPL9mqhMLef9bwzIJdDqUGSOeoP0DM3KrpRUmV5/lCxhjmtMuiv\n\t8wMxxeaAofTImQgsiD/lQuqORLSvo8MexmTIji2cw39kVCVGKnC1A9sD7rxeHk6Pn2qq\n\thrH8v24cu6IDkGYkTxIhspiT8k0vH3Ak11Jga2esK5KIuNVE+hm0AHY/vV3TfxtSxNRn\n\tY0RwpaiQYCAryw2d2Ww+KyBJXU7JeZy5TmmwgU6MJPBJZ3T6tikoBNFsV99nU+uAY4Y4\n\t7UVA==",
        "X-Gm-Message-State": "APjAAAXwCh3XSqk+zVPX34AngE1gfy8ifZw/p2KIiXKO5ZjT+HMG/6mp\n\t6yRLkvKrMTEcOkgsoKJhtKlJ6LZh3k8=",
        "X-Google-Smtp-Source": "APXvYqxEHI+JLcLoQTdNHn44gS46IhNwwh/Xln4pVrHaeNql+mmXPKEd6t6k9CitP/3am79skyY7jg==",
        "X-Received": "by 2002:a17:90a:af8a:: with SMTP id\n\tw10mr48859646pjq.132.1559781325177; \n\tWed, 05 Jun 2019 17:35:25 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <sthemmin@microsoft.com>",
        "Date": "Wed,  5 Jun 2019 17:35:20 -0700",
        "Message-Id": "<20190606003520.29260-1-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH] bus/vmbus: skip non-network devices",
        "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: Stephen Hemminger <sthemmin@microsoft.com>\n\nThe vmbus scan code can just skip non-network devices.\nMore importantly, this fixes the bug where some vmbus devices\ndon't have all the attributes (like monitor_id) and a single\nfailure would cause the scan to break the loop.\n\nFixes: 831dba47bd36 (\"bus/vmbus: add Hyper-V virtual bus support\")\nSigned-off-by: Stephen Hemminger <sthemmin@microsoft.com>\n---\n drivers/bus/vmbus/linux/vmbus_bus.c | 26 +++++++++++++++++++++-----\n 1 file changed, 21 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/bus/vmbus/linux/vmbus_bus.c b/drivers/bus/vmbus/linux/vmbus_bus.c\nindex a4755a3878df..ca0b433a0824 100644\n--- a/drivers/bus/vmbus/linux/vmbus_bus.c\n+++ b/drivers/bus/vmbus/linux/vmbus_bus.c\n@@ -25,6 +25,18 @@\n /** Pathname of VMBUS devices directory. */\n #define SYSFS_VMBUS_DEVICES \"/sys/bus/vmbus/devices\"\n \n+/*\n+ * GUID associated with network devices\n+ * {f8615163-df3e-46c5-913f-f2d2f965ed0e}\n+ */\n+static const rte_uuid_t vmbus_nic_uuid = {\n+\t0xf8, 0x61, 0x51, 0x63,\n+\t0xdf, 0x3e,\n+\t0x46, 0xc5,\n+\t0x91, 0x3f,\n+\t0xf2, 0xd2, 0xf9, 0x65, 0xed, 0xe\n+};\n+\n extern struct rte_vmbus_bus rte_vmbus_bus;\n \n /* Read sysfs file to get UUID */\n@@ -242,16 +254,20 @@ vmbus_scan_one(const char *name)\n \tsnprintf(dirname, sizeof(dirname), \"%s/%s\",\n \t\t SYSFS_VMBUS_DEVICES, name);\n \n-\t/* get device id */\n-\tsnprintf(filename, sizeof(filename), \"%s/device_id\", dirname);\n-\tif (parse_sysfs_uuid(filename, dev->device_id) < 0)\n-\t\tgoto error;\n-\n \t/* get device class  */\n \tsnprintf(filename, sizeof(filename), \"%s/class_id\", dirname);\n \tif (parse_sysfs_uuid(filename, dev->class_id) < 0)\n \t\tgoto error;\n \n+\t/* skip non-network devices */\n+\tif (rte_uuid_compare(dev->class_id, vmbus_nic_uuid) != 0)\n+\t\treturn 0;\n+\n+\t/* get device id */\n+\tsnprintf(filename, sizeof(filename), \"%s/device_id\", dirname);\n+\tif (parse_sysfs_uuid(filename, dev->device_id) < 0)\n+\t\tgoto error;\n+\n \t/* get relid */\n \tsnprintf(filename, sizeof(filename), \"%s/id\", dirname);\n \tif (eal_parse_sysfs_value(filename, &tmp) < 0)\n",
    "prefixes": []
}