get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 62074,
    "url": "http://patches.dpdk.org/api/patches/62074/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191028080745.43425-2-yasufum.o@gmail.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": "<20191028080745.43425-2-yasufum.o@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191028080745.43425-2-yasufum.o@gmail.com",
    "date": "2019-10-28T08:07:45",
    "name": "[v5,1/1] fbarray: fix duplicated fbarray file in secondary",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4c7bb255b325cca9a5ff209aeef454ab1b6b706d",
    "submitter": {
        "id": 1356,
        "url": "http://patches.dpdk.org/api/people/1356/?format=api",
        "name": "Yasufumi Ogawa",
        "email": "yasufum.o@gmail.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20191028080745.43425-2-yasufum.o@gmail.com/mbox/",
    "series": [
        {
            "id": 7097,
            "url": "http://patches.dpdk.org/api/series/7097/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7097",
            "date": "2019-10-28T08:07:44",
            "name": "fbarray: fix duplicated fbarray file in secondary",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/7097/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/62074/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/62074/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 EE81A1BF1F;\n\tMon, 28 Oct 2019 09:07:56 +0100 (CET)",
            "from mail-pf1-f196.google.com (mail-pf1-f196.google.com\n\t[209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 8C5711BEFA;\n\tMon, 28 Oct 2019 09:07:53 +0100 (CET)",
            "by mail-pf1-f196.google.com with SMTP id q26so2747139pfn.11;\n\tMon, 28 Oct 2019 01:07:53 -0700 (PDT)",
            "from localhost.localdomain ([192.47.164.146])\n\tby smtp.gmail.com with ESMTPSA id\n\ty24sm3786847pfr.116.2019.10.28.01.07.50\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 28 Oct 2019 01:07:52 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=N6bQivgoOuG90JxskGsugIZLegY58Hw3NB2AezHGokU=;\n\tb=rzKmVVpMujZ9Gr+45W1wskfeLT5VEnOiTNmLH5pPYN3YU8PYujrHtEPabzjaTOw97A\n\t51NqPc3UU8WFXQEUSNVLcbzDT1UFrWwaxCjj+W8EQqsHIVzmYJN/IGcWLMvkLlKGLVVq\n\tybRpG06+Y7ENxdNJTB+b7gYnU6/mhlit3GWQFeP8oXCVnaqL+V+WJMfHchUFhI5D0zOC\n\t9Morv19AYUGk0goa3YmXFSw37ZifAgZAiLP5yBK+1ef7QtyUEtwp3rXql5AlTTO5Qz3S\n\tdc2v6qjdVg7GzUOaE5ViRa/oE4CK/QBFJ3E2KWBLPgBhKgkTYwYzlROV+h5LGhtyZ6xJ\n\t1QcQ==",
        "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=N6bQivgoOuG90JxskGsugIZLegY58Hw3NB2AezHGokU=;\n\tb=Yz3CWf9CUfTaBpqq6y89d5fMfxnV/xALq150Ex8P/WE8VY9NafV1ip5K3ENBKPZH4r\n\t+nDJZAAxV6MzJO+H4x5Pujyhy3yhUE3CN2VzlXQuSYFSpDejTkN34pCgUSPVJO2plAUW\n\txJ4QqgyoCSbeOiBR+qyFOApDu4V+KEg0QGVVoGdiIhOjPOitVyJO1PKZntsl7jtEN2lr\n\tBQszn3pbvXFYqgC5JPi+QwU6cYh1Z7lHgAyupbg/vyw66uroVcTYe25RSUNG3qEKUcMS\n\tCczTcTjokQex93UH54Y+gmdkq8dNwJLNO/5jgC2AmufkctgHdrAsYnNttELgcNa+SOqA\n\tPFRQ==",
        "X-Gm-Message-State": "APjAAAVyhNbBnxOxrdhVeOVHQAZD5o7Wp4DU26QFM7mMpHJeMbxssFO3\n\tu6+zs+2AiiQIRS0uX0qpHhk=",
        "X-Google-Smtp-Source": "APXvYqzjwuXUzwNqx+DtNWmqwadTckEvs++3NurZSKZAOLCq8GSMO7IkuQOWuKcYEQy90/Ft1UEZaQ==",
        "X-Received": "by 2002:a63:ff56:: with SMTP id\n\ts22mr19278261pgk.44.1572250072747; \n\tMon, 28 Oct 2019 01:07:52 -0700 (PDT)",
        "From": "yasufum.o@gmail.com",
        "To": "anatoly.burakov@intel.com,\n\tdavid.marchand@redhat.com",
        "Cc": "dev@dpdk.org, stable@dpdk.org, yasufum.o@gmail.com,\n\tYasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>",
        "Date": "Mon, 28 Oct 2019 17:07:45 +0900",
        "Message-Id": "<20191028080745.43425-2-yasufum.o@gmail.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191028080745.43425-1-yasufum.o@gmail.com>",
        "References": "<20190724082031.45546-1-yasufum.o@gmail.com>\n\t<20191028080745.43425-1-yasufum.o@gmail.com>",
        "Subject": "[dpdk-dev] [PATCH v5 1/1] fbarray: fix duplicated fbarray file in\n\tsecondary",
        "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": "From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>\n\nIn secondary_msl_create_walk(), it creates a file for fbarrays with its\nPID for reserving unique name among secondary processes. However, it\ndoes not work if several secondaries run as app containers because each\nof containerized secondary has PID 1, and failed to reserve unique name\nother than first one. To reserve unique name in each of containers, use\nhostname instead of PID only if PID is 1.\n\nCc: stable@dpdk.org\n\nSigned-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>\n---\n lib/librte_eal/linux/eal/eal_memalloc.c | 15 +++++++++++++--\n 1 file changed, 13 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c\nindex af6d0d023..699079791 100644\n--- a/lib/librte_eal/linux/eal/eal_memalloc.c\n+++ b/lib/librte_eal/linux/eal/eal_memalloc.c\n@@ -1365,6 +1365,7 @@ secondary_msl_create_walk(const struct rte_memseg_list *msl,\n \tstruct rte_memseg_list *primary_msl, *local_msl;\n \tchar name[PATH_MAX];\n \tint msl_idx, ret;\n+\tchar proc_id[HOST_NAME_MAX] = { 0 };\n \n \tif (msl->external)\n \t\treturn 0;\n@@ -1374,8 +1375,18 @@ secondary_msl_create_walk(const struct rte_memseg_list *msl,\n \tlocal_msl = &local_memsegs[msl_idx];\n \n \t/* create distinct fbarrays for each secondary */\n-\tsnprintf(name, RTE_FBARRAY_NAME_LEN, \"%s_%i\",\n-\t\tprimary_msl->memseg_arr.name, getpid());\n+\t/* If run secondary in a container, the name of fbarray file should\n+\t * not be decided with pid because getpid() always returns 1.\n+\t * In docker, hostname is assigned as a short form of full container\n+\t * ID. So use hostname as unique ID among containers instead.\n+\t */\n+\tif (getpid() == 1)\n+\t\tgethostname(proc_id, HOST_NAME_MAX);\n+\telse\n+\t\tsprintf(proc_id, \"%d\", (int)getpid());\n+\n+\tsnprintf(name, RTE_FBARRAY_NAME_LEN, \"%s_%s\",\n+\t\t\tprimary_msl->memseg_arr.name, proc_id);\n \n \tret = rte_fbarray_init(&local_msl->memseg_arr, name,\n \t\tprimary_msl->memseg_arr.len,\n",
    "prefixes": [
        "v5",
        "1/1"
    ]
}