get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8565,
    "url": "https://patches.dpdk.org/api/patches/8565/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446550500-24029-2-git-send-email-david.marchand@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": "<1446550500-24029-2-git-send-email-david.marchand@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446550500-24029-2-git-send-email-david.marchand@6wind.com",
    "date": "2015-11-03T11:34:59",
    "name": "[dpdk-dev,v2,1/2] ethdev: rework value return by rte_eth_dev_is_detachable",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "1ce72a6a4e54ee7e5a7299c1afb45b4ea087744a",
    "submitter": {
        "id": 3,
        "url": "https://patches.dpdk.org/api/people/3/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1446550500-24029-2-git-send-email-david.marchand@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/8565/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/8565/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 91C3B8E92;\n\tTue,  3 Nov 2015 12:35:25 +0100 (CET)",
            "from mail-wm0-f45.google.com (mail-wm0-f45.google.com\n\t[74.125.82.45]) by dpdk.org (Postfix) with ESMTP id B95348E8B\n\tfor <dev@dpdk.org>; Tue,  3 Nov 2015 12:35:24 +0100 (CET)",
            "by wmeg8 with SMTP id g8so82001571wme.0\n\tfor <dev@dpdk.org>; Tue, 03 Nov 2015 03:35:24 -0800 (PST)",
            "from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.\n\t[82.239.227.177]) by smtp.gmail.com with ESMTPSA id\n\tpc2sm5536175wjb.11.2015.11.03.03.35.23\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 03 Nov 2015 03:35:23 -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=hyJ/JGiiMcnMUftOZXMfd278uUfPpmhA9WepyuYA+c0=;\n\tb=G1eoOrXt7MABzdRB6MrixyE7QCOPQ9Sl43Vyo5Y53eAE/jd9hh5C0ea0KWRetlknks\n\tIrvXUqrbVeoOJYvbvyqKjF/EAO8J6jA7+7GNaYI4HdfsaCunNrHI+zf0cAOOvPuKrUWS\n\tWLi+VL/vAwsENBmsHTSvLG07+hKE8zKwDSn8SCl7H+JBRQXNnDWR9V7BqNkR42htJ7sI\n\t86VknUTH/HPy3K6De67VaU/FyoNjywFik4oqHrnygl6vmac0iYnHHZP6O+ZFfFcAfmye\n\tWKLdjxydDK1uAFTOKXpJU22Xrgg7YE8NPn5+aicYWZx9jfxPzB4kt3iAX9x3E/ygYuu4\n\theDQ==",
        "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=hyJ/JGiiMcnMUftOZXMfd278uUfPpmhA9WepyuYA+c0=;\n\tb=jdhETn45J4bBspIx4QxklUefgANCvR1MgIZA5qdjH2k6UNfvzKN2fWEZy+ayQo7prp\n\t4BojG+KobsdRS0g2m1uddcKGTYuIuunuyrgnX7+40URJOW3HfCg/P3y40HjypvnVgqBg\n\tobvDAq+mYqwoKHHe7h68ZFd5RhfqNEnuGVjD6qPwYOqk0NQHCDZy+IuuEC2yJrQJtOm1\n\t7lyKqaKrGY3q/JaLqqoyVSU8z8BJPgbez7xLuZzfB0SrUPw+GD7AZDIdxMK38ZoeaQSE\n\t1QyI4z4ufNxtpATuWVXmXxTZkNmDhNdr3ztW4mQ4kzGvqYALDvPMbA3uLK7xu0uxr6Zp\n\tTlbQ==",
        "X-Gm-Message-State": "ALoCoQlSMLqBxB6d+K05dTtDQbrMilZuFtCKh08/Of32NisohjjoW/Ca6Vpgt24mftFf2Wq527kT",
        "X-Received": "by 10.28.138.148 with SMTP id m142mr17870452wmd.79.1446550524622;\n\tTue, 03 Nov 2015 03:35:24 -0800 (PST)",
        "From": "David Marchand <david.marchand@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  3 Nov 2015 12:34:59 +0100",
        "Message-Id": "<1446550500-24029-2-git-send-email-david.marchand@6wind.com>",
        "X-Mailer": "git-send-email 1.7.10.4",
        "In-Reply-To": "<1446550500-24029-1-git-send-email-david.marchand@6wind.com>",
        "References": "<1446108903-14412-1-git-send-email-david.marchand@6wind.com>\n\t<1446550500-24029-1-git-send-email-david.marchand@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v2 1/2] ethdev: rework value return by\n\trte_eth_dev_is_detachable",
        "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": "From: Maxime Leroy <maxime.leroy@6wind.com>\n\nThe rte_eth_dev_is_detachable return 0 when the device is detachable.\nIt not, this one return a negative value or 1.\nSuch behavior is not logical.\n\nThis patch modifies this function to return 1 when the device is detachable\nand 0 when is not.\n\nSigned-off-by: Maxime Leroy <maxime.leroy@6wind.com>\nSigned-off-by: David Marchand <david.marchand@6wind.com>\n---\n lib/librte_ether/rte_ethdev.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 073ffe9..ec1b632 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -510,7 +510,7 @@ rte_eth_dev_is_detachable(uint8_t port_id)\n \n \tif (!rte_eth_dev_is_valid_port(port_id)) {\n \t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n-\t\treturn -EINVAL;\n+\t\treturn 0;\n \t}\n \n \tif (rte_eth_devices[port_id].dev_type == RTE_ETH_DEV_PCI) {\n@@ -521,12 +521,12 @@ rte_eth_dev_is_detachable(uint8_t port_id)\n \t\t\tbreak;\n \t\tcase RTE_KDRV_VFIO:\n \t\tdefault:\n-\t\t\treturn -ENOTSUP;\n+\t\t\treturn 0;\n \t\t}\n \t}\n \n \tdrv_flags = rte_eth_devices[port_id].driver->pci_drv.drv_flags;\n-\treturn !(drv_flags & RTE_PCI_DRV_DETACHABLE);\n+\treturn drv_flags & RTE_PCI_DRV_DETACHABLE;\n }\n \n /* attach the new physical device, then store port_id of the device */\n@@ -574,7 +574,7 @@ rte_eth_dev_detach_pdev(uint8_t port_id, struct rte_pci_addr *addr)\n \t\tgoto err;\n \n \t/* check whether the driver supports detach feature, or not */\n-\tif (rte_eth_dev_is_detachable(port_id))\n+\tif (!rte_eth_dev_is_detachable(port_id))\n \t\tgoto err;\n \n \t/* get pci address by port id */\n@@ -651,7 +651,7 @@ rte_eth_dev_detach_vdev(uint8_t port_id, char *vdevname)\n \t\tgoto err;\n \n \t/* check whether the driver supports detach feature, or not */\n-\tif (rte_eth_dev_is_detachable(port_id))\n+\tif (!rte_eth_dev_is_detachable(port_id))\n \t\tgoto err;\n \n \t/* get device name by port id */\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "1/2"
    ]
}