get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1384,
    "url": "https://patches.dpdk.org/api/patches/1384/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1416474399-16851-22-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": "<1416474399-16851-22-git-send-email-mukawa@igel.co.jp>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1416474399-16851-22-git-send-email-mukawa@igel.co.jp",
    "date": "2014-11-20T09:06:35",
    "name": "[dpdk-dev,21/25] eal/pci: Fix pci_probe_all_drivers to share code with closing function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "52ac57c1baa6049afe561aee0669a1a9bafcf323",
    "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/1416474399-16851-22-git-send-email-mukawa@igel.co.jp/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1384/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1384/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 1542A8053;\n\tThu, 20 Nov 2014 09:57:49 +0100 (CET)",
            "from mail-pd0-f170.google.com (mail-pd0-f170.google.com\n\t[209.85.192.170]) by dpdk.org (Postfix) with ESMTP id 88E458037\n\tfor <dev@dpdk.org>; Thu, 20 Nov 2014 09:57:41 +0100 (CET)",
            "by mail-pd0-f170.google.com with SMTP id fp1so2723335pdb.1\n\tfor <dev@dpdk.org>; Thu, 20 Nov 2014 01:08:10 -0800 (PST)",
            "from localhost.localdomain (napt.igel.co.jp. [219.106.231.132])\n\tby mx.google.com with ESMTPSA id\n\ta6sm1432407pbu.64.2014.11.20.01.08.07 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 20 Nov 2014 01:08:09 -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=+xIK2XzZo5dGkkQE9LtGoiGlJl84rmcmYxFgGMCOK58=;\n\tb=DZqfZSUBz3kKsJJ4q5ovBowiACcz38cX5PlwQCFxRwwTFYn7TkoYJuqsWMykqo9fPJ\n\t/6NoWgwk3V11UreuTV63rBJ+ZawuFkBDwFEmvO9bj5p18a82a05/aHpS5enHtKF6a8QL\n\twKC/U0bvu+LyxaWjOnCXkHDHBSpYhZNEtTHWSMaXRtLJMoxPot+uTNvOvQK06vdjEsdl\n\tNaJHueGq97uvM3RjOzpd96E5Cu4zLtCbJlgdBh6fpsO9bHpUHaLENWTHj7Gs+nZ2Evw9\n\tidcp4C32vIv1oAU0JgoMwm5ehXAiJC0yh+R0qOkd/yoRP2HIx50V8l4KV2s1loLGk1c7\n\t9P1w==",
        "X-Gm-Message-State": "ALoCoQmSJ1hZzkhNyFJM0bhitx/xpavHboUk3SSQi8QE/9LmGbIMyQbQOyCd9tWQKN2yr8fMiamr",
        "X-Received": "by 10.69.18.225 with SMTP id gp1mr27833933pbd.144.1416474490361; \n\tThu, 20 Nov 2014 01:08:10 -0800 (PST)",
        "From": "Tetsuya Mukawa <mukawa@igel.co.jp>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 20 Nov 2014 18:06:35 +0900",
        "Message-Id": "<1416474399-16851-22-git-send-email-mukawa@igel.co.jp>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1416474399-16851-1-git-send-email-mukawa@igel.co.jp>",
        "References": "<1414572576-21371-1-git-send-email-mukawa@igel.co.jp>\n\t<1416474399-16851-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 21/25] eal/pci: Fix pci_probe_all_drivers to\n\tshare code with closing function",
        "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": "pci_close_all_drivers() will be implemented after the patch.\nTo share a part of code between thses 2 functions, The patch fixes\npci_probe_all_drivers() first.\n\nSigned-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>\n---\n lib/librte_eal/common/eal_common_pci.c | 28 ++++++++++++++++++++--------\n 1 file changed, 20 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c\nindex f01f258..1e3efea 100644\n--- a/lib/librte_eal/common/eal_common_pci.c\n+++ b/lib/librte_eal/common/eal_common_pci.c\n@@ -99,19 +99,20 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev)\n \treturn NULL;\n }\n \n-/*\n- * If vendor/device ID match, call the devinit() 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+#define INVOKE_PROBE\t(0)\n+\n static int\n-pci_probe_all_drivers(struct rte_pci_device *dev)\n+pci_invoke_all_drivers(struct rte_pci_device *dev, int type)\n {\n \tstruct rte_pci_driver *dr = NULL;\n-\tint rc;\n+\tint rc = 0;\n \n \tTAILQ_FOREACH(dr, &pci_driver_list, next) {\n-\t\trc = rte_eal_pci_probe_one_driver(dr, dev);\n+\t\tswitch (type) {\n+\t\tcase INVOKE_PROBE:\n+\t\t\trc = rte_eal_pci_probe_one_driver(dr, dev);\n+\t\t\tbreak;\n+\t\t}\n \t\tif (rc < 0)\n \t\t\t/* negative value is an error */\n \t\t\treturn -1;\n@@ -124,6 +125,17 @@ pci_probe_all_drivers(struct rte_pci_device *dev)\n }\n \n /*\n+ * If vendor/device ID match, call the devinit() 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_probe_all_drivers(struct rte_pci_device *dev)\n+{\n+\treturn pci_invoke_all_drivers(dev, INVOKE_PROBE);\n+}\n+\n+/*\n  * Scan the content of the PCI bus, and call the devinit() function for\n  * all registered drivers that have a matching entry in its id_table\n  * for discovered devices.\n",
    "prefixes": [
        "dpdk-dev",
        "21/25"
    ]
}