get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 48332,
    "url": "http://patches.dpdk.org/api/patches/48332/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20181123212640.111642-1-dariusz.stojaczyk@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20181123212640.111642-1-dariusz.stojaczyk@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20181123212640.111642-1-dariusz.stojaczyk@intel.com",
    "date": "2018-11-23T21:26:40",
    "name": "[v2] dev: fix attach rollback of a device that was already attached",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8e65b5b159d0c3c55816b32da036dd4702a3389a",
    "submitter": {
        "id": 1123,
        "url": "http://patches.dpdk.org/api/people/1123/?format=api",
        "name": "Stojaczyk, Dariusz",
        "email": "dariusz.stojaczyk@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20181123212640.111642-1-dariusz.stojaczyk@intel.com/mbox/",
    "series": [
        {
            "id": 2563,
            "url": "http://patches.dpdk.org/api/series/2563/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2563",
            "date": "2018-11-23T21:26:40",
            "name": "[v2] dev: fix attach rollback of a device that was already attached",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/2563/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/48332/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/48332/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 E651B1B5E7;\n\tFri, 23 Nov 2018 22:38:19 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 05B2D1B5BD\n\tfor <dev@dpdk.org>; Fri, 23 Nov 2018 22:38:17 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t23 Nov 2018 13:38:16 -0800",
            "from violet.igk.intel.com ([10.102.54.137])\n\tby fmsmga001.fm.intel.com with ESMTP; 23 Nov 2018 13:38:15 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.56,271,1539673200\"; d=\"scan'208\";a=\"110648301\"",
        "From": "Darek Stojaczyk <dariusz.stojaczyk@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, Darek Stojaczyk <dariusz.stojaczyk@intel.com>,\n\tqi.z.zhang@intel.com",
        "Date": "Fri, 23 Nov 2018 22:26:40 +0100",
        "Message-Id": "<20181123212640.111642-1-dariusz.stojaczyk@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20181123144506.95367-1-dariusz.stojaczyk@intel.com>",
        "References": "<20181123144506.95367-1-dariusz.stojaczyk@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2] dev: fix attach rollback of a device that was\n\talready attached",
        "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": "When primary process receives an IPC attach request\nof a device that's already locally-attached, it\ndoesn't setup its variables properly and is prone to\nsegfaulting on a subsequent rollback.\n\n`ret = local_dev_probe(req->devargs, &dev)`\n\nThe above function will set `dev` pointer to the\nproper device *unless* it returns with error. One of\nthose errors is -EEXIST, which the hotplug function\nexplicitly ignores. For -EEXIST, it proceeds with\nattaching the device and expects the dev pointer to\nbe valid.\n\nThis patch makes `local_dev_probe` set the dev pointer\neven if it returns -EEXIST.\n\nFixes: ac9e4a17370f (\"eal: support attach/detach shared device from secondary\")\nCc: qi.z.zhang@intel.com\n\nSigned-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>\n---\nChanges since v1:\n * attempt to detach the device in primary process (Qi)\n\n lib/librte_eal/common/eal_common_dev.c | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c\nindex 1fdc9ab17..a08dc085f 100644\n--- a/lib/librte_eal/common/eal_common_dev.c\n+++ b/lib/librte_eal/common/eal_common_dev.c\n@@ -168,16 +168,14 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)\n \t}\n \n \tret = dev->bus->plug(dev);\n-\tif (ret) {\n-\t\tif (rte_dev_is_probed(dev)) /* if already succeeded earlier */\n-\t\t\treturn ret; /* no rollback */\n+\tif (ret && !rte_dev_is_probed(dev)) { /* if hasn't ever succeeded */\n \t\tRTE_LOG(ERR, EAL, \"Driver cannot attach the device (%s)\\n\",\n \t\t\tdev->name);\n \t\tgoto err_devarg;\n \t}\n \n \t*new_dev = dev;\n-\treturn 0;\n+\treturn ret;\n \n err_devarg:\n \tif (rte_devargs_remove(da) != 0) {\n",
    "prefixes": [
        "v2"
    ]
}