get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1846,
    "url": "https://patches.dpdk.org/api/patches/1846/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1418096571-27531-21-git-send-email-mukawa@igel.co.jp/",
    "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": "<1418096571-27531-21-git-send-email-mukawa@igel.co.jp>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1418096571-27531-21-git-send-email-mukawa@igel.co.jp",
    "date": "2014-12-09T03:42:43",
    "name": "[dpdk-dev,v2,20/28] eal/pci: Add rte_eal_pci_close_one_driver",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2bce6c20702a24b200145ca95b35f6fd5e8dd902",
    "submitter": {
        "id": 64,
        "url": "https://patches.dpdk.org/api/people/64/?format=api",
        "name": "Tetsuya Mukawa",
        "email": "mukawa@igel.co.jp"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1418096571-27531-21-git-send-email-mukawa@igel.co.jp/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1846/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1846/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 415F88052;\n\tTue,  9 Dec 2014 04:44:04 +0100 (CET)",
            "from mail-pa0-f45.google.com (mail-pa0-f45.google.com\n\t[209.85.220.45]) by dpdk.org (Postfix) with ESMTP id E5F248093\n\tfor <dev@dpdk.org>; Tue,  9 Dec 2014 04:44:01 +0100 (CET)",
            "by mail-pa0-f45.google.com with SMTP id lj1so6541031pab.32\n\tfor <dev@dpdk.org>; Mon, 08 Dec 2014 19:44:01 -0800 (PST)",
            "from eris.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132])\n\tby mx.google.com with ESMTPSA id xx2sm2185pab.17.2014.12.08.19.43.58\n\tfor <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 08 Dec 2014 19:44:00 -0800 (PST)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=uXt/1cNxTPtKdBH98VUPG978D4NvgSsQVWq5OwleSwo=;\n\tb=NL6dQRDptHAlekV3Y9f3SFiynGgsL6nFggNOtmId/bT0m+IeD/pxGtFauXXQFxmM1f\n\tBv/f8uTj5ePkqcsHMUvBr+a2Z7Skr4PvWCubfryHtuQH/RNOaEWarvFzbnXklHH7OAS0\n\tvINYHRdyCLU6c+Wvxdoda/saACw6gc79+0CpraOGm3/zttF6Ov2h/vh6r78Oc7fnEefX\n\thTAwmaZ7E3rbKuFUUf18a47Wyjo6nAAbKQoWJqvU4o77/JT1PzfIPkvgM+W7aitQuc5i\n\tCGpr/KbXrOie+uSbJndXIkiawTxbeomWIBjt2mR0BipFCGKeOUECcWLpW5NGuHyzBr7d\n\tQDvg==",
        "X-Gm-Message-State": "ALoCoQnC2VACbXbMdKVgLo2Qv6P4lRObLNepPiZDZxLPKMZwUdH95Wt+mZ4GPuy1S0uz2LY5gQZ4",
        "X-Received": "by 10.68.213.138 with SMTP id ns10mr1489526pbc.50.1418096641125; \n\tMon, 08 Dec 2014 19:44:01 -0800 (PST)",
        "From": "Tetsuya Mukawa <mukawa@igel.co.jp>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  9 Dec 2014 12:42:43 +0900",
        "Message-Id": "<1418096571-27531-21-git-send-email-mukawa@igel.co.jp>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1418096571-27531-1-git-send-email-mukawa@igel.co.jp>",
        "References": "<1416474399-16851-1-git-send-email-mukawa@igel.co.jp>\n\t<1418096571-27531-1-git-send-email-mukawa@igel.co.jp>",
        "Cc": "nakajima.yoshihiro@lab.ntt.co.jp, menrigh@brocade.com,\n\tmasutani.hitoshi@lab.ntt.co.jp",
        "Subject": "[dpdk-dev] [PATCH v2 20/28] eal/pci: Add\n\trte_eal_pci_close_one_driver",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The function is used for closing the specified driver and device.\n\nSigned-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>\n---\n lib/librte_eal/common/eal_private.h   | 15 +++++++++\n lib/librte_eal/linuxapp/eal/eal_pci.c | 61 +++++++++++++++++++++++++++++++++++\n 2 files changed, 76 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h\nindex a1127ab..f892ac4 100644\n--- a/lib/librte_eal/common/eal_private.h\n+++ b/lib/librte_eal/common/eal_private.h\n@@ -176,6 +176,21 @@ int rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr,\n \t\tstruct rte_pci_device *dev);\n \n /**\n+ * Munmap memory for single PCI device\n+ *\n+ * This function is private to EAL.\n+ *\n+ * @param\tdr\n+ *  The pointer to the pci driver structure\n+ * @param\tdev\n+ *  The pointer to the pci device structure\n+ * @return\n+ *   0 on success, negative on error\n+ */\n+int rte_eal_pci_close_one_driver(struct rte_pci_driver *dr,\n+\t\tstruct rte_pci_device *dev);\n+\n+/**\n  * Init tail queues for non-EAL library structures. This is to allow\n  * the rings, mempools, etc. lists to be shared among multiple processes\n  *\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c\nindex 8d683f5..93456f3 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_pci.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c\n@@ -616,6 +616,67 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d\n \treturn 1;\n }\n \n+#if defined(RTE_LIBRTE_EAL_HOTPLUG) && defined(RTE_LIBRTE_EAL_LINUXAPP)\n+/*\n+ * If vendor/device ID match, call the devshutdown() function of the\n+ * driver.\n+ */\n+int\n+rte_eal_pci_close_one_driver(struct rte_pci_driver *dr,\n+\t\tstruct rte_pci_device *dev)\n+{\n+\tstruct rte_pci_id *id_table;\n+\n+\tif ((dr == NULL) || (dev == NULL))\n+\t\treturn -EINVAL;\n+\n+\tfor (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) {\n+\n+\t\t/* check if device's identifiers match the driver's ones */\n+\t\tif (id_table->vendor_id != dev->id.vendor_id &&\n+\t\t\t\tid_table->vendor_id != PCI_ANY_ID)\n+\t\t\tcontinue;\n+\t\tif (id_table->device_id != dev->id.device_id &&\n+\t\t\t\tid_table->device_id != PCI_ANY_ID)\n+\t\t\tcontinue;\n+\t\tif (id_table->subsystem_vendor_id !=\n+\t\t\t\tdev->id.subsystem_vendor_id &&\n+\t\t\t\tid_table->subsystem_vendor_id != PCI_ANY_ID)\n+\t\t\tcontinue;\n+\t\tif (id_table->subsystem_device_id !=\n+\t\t\t\tdev->id.subsystem_device_id &&\n+\t\t\t\tid_table->subsystem_device_id != PCI_ANY_ID)\n+\t\t\tcontinue;\n+\n+\t\tstruct rte_pci_addr *loc = &dev->addr;\n+\n+\t\tRTE_LOG(DEBUG, EAL,\n+\t\t\t\t\"PCI device \"PCI_PRI_FMT\" on NUMA socket %i\\n\",\n+\t\t\t\tloc->domain, loc->bus, loc->devid,\n+\t\t\t\tloc->function, dev->numa_node);\n+\n+\t\tRTE_LOG(DEBUG, EAL, \"  remove driver: %x:%x %s\\n\",\n+\t\t\t\tdev->id.vendor_id, dev->id.device_id,\n+\t\t\t\tdr->name);\n+\n+\t\t/* call the driver devshutdown() function */\n+\t\tif (dr->devshutdown && (dr->devshutdown(dr, dev) < 0))\n+\t\t\treturn -1;\t/* negative value is an error */\n+\n+\t\t/* clear driver structure */\n+\t\tdev->driver = NULL;\n+\n+\t\tif (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING)\n+\t\t\t/* unmap resources for devices that use igb_uio */\n+\t\t\tpci_unmap_device(dev);\n+\n+\t\treturn 0;\n+\t}\n+\t/* return positive value if driver is not found */\n+\treturn 1;\n+}\n+#endif /* RTE_LIBRTE_EAL_HOTPLUG & RTE_LIBRTE_EAL_LINUXAPP */\n+\n /* Init the PCI EAL subsystem */\n int\n rte_eal_pci_init(void)\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "20/28"
    ]
}