get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 19764,
    "url": "https://patches.dpdk.org/api/patches/19764/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1484801117-779-9-git-send-email-thomas.monjalon@6wind.com/",
    "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": "<1484801117-779-9-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1484801117-779-9-git-send-email-thomas.monjalon@6wind.com",
    "date": "2017-01-19T04:45:12",
    "name": "[dpdk-dev,v11,08/13] pci: remove loop over drivers in device detach",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cbfdfc72e603ee8b25c46920f961c9605b77ecb6",
    "submitter": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1484801117-779-9-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/19764/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/19764/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 BD5C6FB53;\n\tThu, 19 Jan 2017 05:45:51 +0100 (CET)",
            "from mail-wm0-f44.google.com (mail-wm0-f44.google.com\n\t[74.125.82.44]) by dpdk.org (Postfix) with ESMTP id BE854FB30\n\tfor <dev@dpdk.org>; Thu, 19 Jan 2017 05:45:30 +0100 (CET)",
            "by mail-wm0-f44.google.com with SMTP id r144so58581776wme.1\n\tfor <dev@dpdk.org>; Wed, 18 Jan 2017 20:45:30 -0800 (PST)",
            "from XPS13.localdomain (184.203.134.77.rev.sfr.net.\n\t[77.134.203.184]) by smtp.gmail.com with ESMTPSA id\n\tt194sm2568586wmd.1.2017.01.18.20.45.29\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 18 Jan 2017 20:45:29 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=kw0XqL8UvR/iFB6GNchlAReoxYhIHWZ1gZ+DHslfUTg=;\n\tb=C61Nl+RbdC8+nbczHbLklwayzp9EHdXOOd3t7v+p8iL8YwyUt5De7srXJ89hGoFITC\n\tFu+FD+Sbs5GzIcPbwIggYCerA7/Nqts9eUi/ExxzAJBIvkt3Dfcz6DRisIzi0C+Vkb1M\n\tgZV+Je/p4vgF3Xgk/ZgROOAqr3BA2BOvT9wmuFVmOA9db2Wb+VzHV48+Xg7JyLZ/x5Rc\n\tfvf80sUJwoqToDFaU2L4qNPMrEBkbMkUh05HmLvWCFsv0lweOmQZwtFR5COW7FXdLWlz\n\tHYz7enqEC/ZcygQ6seeG5zPg/muRfqNI3ikGFTW8eqfB5LnmN/38xl1Uq4O0NTKi1T3o\n\tux9Q==",
        "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:in-reply-to\n\t:references;\n\tbh=kw0XqL8UvR/iFB6GNchlAReoxYhIHWZ1gZ+DHslfUTg=;\n\tb=QfTZNBT4J2PF8AY7wvi+8JRzVrDgR5m1EVSgQt5In9WVf0oriF06zDlUmlX8yAwM5T\n\tKKXG1+2qLbWiDEsAIVYESXz+0H2h6ztAmwFNYewEX1KjpAiR/kaCl4JUGd4falZwpSBU\n\t0H9Rqg5LCnViEIHJ0iYibALU/EraxLKJguAZPu3zAK+38iJOvksbWkR0LosNOM7mqzBl\n\tlfhUqc/vwYZIdqLT3PYzTVyrxg0lC+fx4qlv/XiZ6FUZHHkByzaaRmAcCpsCxv9AkaEo\n\tsYQB3Mk21dIJZAzC4gINx7OKkHjMhvYbaD+elQ2AY890BQVqNZ0hsjlY24IdIlEMWF+u\n\tTqaQ==",
        "X-Gm-Message-State": "AIkVDXJ0KIBGJ1VEiEtCdG1qs8eUL66R1uX8Lsny8Ok3ZK3s0TsmIVmXoauSE3XtfDU/Wnx+",
        "X-Received": "by 10.223.162.205 with SMTP id t13mr4179447wra.155.1484801130408;\n\tWed, 18 Jan 2017 20:45:30 -0800 (PST)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "Shreyansh Jain <shreyansh.jain@nxp.com>",
        "Cc": "dev@dpdk.org",
        "Date": "Thu, 19 Jan 2017 05:45:12 +0100",
        "Message-Id": "<1484801117-779-9-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.7.0",
        "In-Reply-To": "<1484801117-779-1-git-send-email-thomas.monjalon@6wind.com>",
        "References": "<1484748329-5418-1-git-send-email-shreyansh.jain@nxp.com>\n\t<1484801117-779-1-git-send-email-thomas.monjalon@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v11 08/13] pci: remove loop over drivers in\n\tdevice detach",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "From: Shreyansh Jain <shreyansh.jain@nxp.com>\n\nrte_eal_pci_detach calls pci_detach_all_drivers which loops over all\nPCI drivers for detaching the device. This is unnecessary as the device\nalready has the PCI driver reference which can be used directly.\n\nRemoving pci_detach_all_drivers and restructuring rte_eal_pci_detach\nand rte_eal_pci_detach_dev to work without looping over driver list.\n\nSigned-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>\n---\n lib/librte_eal/common/eal_common_pci.c | 47 +++++++---------------------------\n 1 file changed, 9 insertions(+), 38 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c\nindex 4f155c6..8b4ae2d 100644\n--- a/lib/librte_eal/common/eal_common_pci.c\n+++ b/lib/librte_eal/common/eal_common_pci.c\n@@ -259,21 +259,15 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr,\n  * driver.\n  */\n static int\n-rte_eal_pci_detach_dev(struct rte_pci_driver *dr,\n-\t\tstruct rte_pci_device *dev)\n+rte_eal_pci_detach_dev(struct rte_pci_device *dev)\n {\n-\tint ret;\n \tstruct rte_pci_addr *loc;\n+\tstruct rte_pci_driver *dr;\n \n-\tif ((dr == NULL) || (dev == NULL))\n+\tif (dev == NULL)\n \t\treturn -EINVAL;\n \n-\tret = rte_pci_match(dr, dev);\n-\tif (ret) {\n-\t\t/* Device and driver don't match */\n-\t\treturn 1;\n-\t}\n-\n+\tdr = dev->driver;\n \tloc = &dev->addr;\n \n \tRTE_LOG(DEBUG, EAL, \"PCI device \"PCI_PRI_FMT\" on NUMA socket %i\\n\",\n@@ -328,33 +322,6 @@ pci_probe_all_drivers(struct rte_pci_device *dev)\n }\n \n /*\n- * If vendor/device ID match, call the remove() function of all\n- * registered driver for the given device. Return -1 if initialization\n- * failed, return 1 if no driver is found for this device.\n- */\n-static int\n-pci_detach_all_drivers(struct rte_pci_device *dev)\n-{\n-\tstruct rte_pci_driver *dr = NULL;\n-\tint rc = 0;\n-\n-\tif (dev == NULL)\n-\t\treturn -1;\n-\n-\tTAILQ_FOREACH(dr, &pci_driver_list, next) {\n-\t\trc = rte_eal_pci_detach_dev(dr, dev);\n-\t\tif (rc < 0)\n-\t\t\t/* negative value is an error */\n-\t\t\treturn -1;\n-\t\tif (rc > 0)\n-\t\t\t/* positive value means driver doesn't support it */\n-\t\t\tcontinue;\n-\t\treturn 0;\n-\t}\n-\treturn 1;\n-}\n-\n-/*\n  * Find the pci device specified by pci address, then invoke probe function of\n  * the driver of the devive.\n  */\n@@ -407,9 +374,13 @@ rte_eal_pci_detach(const struct rte_pci_addr *addr)\n \t\tif (rte_eal_compare_pci_addr(&dev->addr, addr))\n \t\t\tcontinue;\n \n-\t\tret = pci_detach_all_drivers(dev);\n+\t\tret = rte_eal_pci_detach_dev(dev);\n \t\tif (ret < 0)\n+\t\t\t/* negative value is an error */\n \t\t\tgoto err_return;\n+\t\tif (ret > 0)\n+\t\t\t/* positive value means driver doesn't support it */\n+\t\t\tcontinue;\n \n \t\tTAILQ_REMOVE(&pci_device_list, dev, next);\n \t\tfree(dev);\n",
    "prefixes": [
        "dpdk-dev",
        "v11",
        "08/13"
    ]
}