get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 63335,
    "url": "http://patches.dpdk.org/api/patches/63335/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191127084826.3519-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": "<20191127084826.3519-2-yasufum.o@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191127084826.3519-2-yasufum.o@gmail.com",
    "date": "2019-11-27T08:48:26",
    "name": "[v8,1/1] fbarray: fix duplicated fbarray file in secondary",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "9cdd268c16a3470b3598f0cddf7f6ad61c9ffc5c",
    "submitter": {
        "id": 1356,
        "url": "http://patches.dpdk.org/api/people/1356/?format=api",
        "name": "Yasufumi Ogawa",
        "email": "yasufum.o@gmail.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20191127084826.3519-2-yasufum.o@gmail.com/mbox/",
    "series": [
        {
            "id": 7654,
            "url": "http://patches.dpdk.org/api/series/7654/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7654",
            "date": "2019-11-27T08:48:25",
            "name": "fbarray: fix duplicated fbarray file in secondary",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/7654/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/63335/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/63335/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B0251A04E0;\n\tWed, 27 Nov 2019 09:48:39 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BC3201BE86;\n\tWed, 27 Nov 2019 09:48:37 +0100 (CET)",
            "from mail-pl1-f195.google.com (mail-pl1-f195.google.com\n [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id 103D31BDAC\n for <dev@dpdk.org>; Wed, 27 Nov 2019 09:48:35 +0100 (CET)",
            "by mail-pl1-f195.google.com with SMTP id w7so9426838plz.12\n for <dev@dpdk.org>; Wed, 27 Nov 2019 00:48:34 -0800 (PST)",
            "from localhost.localdomain\n ([2400:4050:c8c2:de00:45ab:5a00:e90c:7c6b])\n by smtp.gmail.com with ESMTPSA id t27sm15902108pfq.169.2019.11.27.00.48.32\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 27 Nov 2019 00:48:33 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=E2owshsU77/p6fU9EnhCNRWEW8TuRgS6uHbkanjHwbk=;\n b=Cgex5LF5EdmJeh8H98T3egprvxB0gsXFBg36BkR/2/Lz67E29D1AJLohRi+OOvdm59\n YzECzMb1aNyT6rWRyL3zkwamhNvpkbraYk2KKzSXbAo6MX7HU9xbc23xXngJJZvqXRcn\n DswKI8d9aYB3BZXCT/IuC2LenGwNZJij/hB5qin05HJ0W/pmwyL8eaQ/u5gGidJ07H0k\n FRoITh+DXTFNcp/1K8/9D2IK6zQKg/xNE5Tcq6Zy0eHKEB/t9YOqwLMAVbgYrqxC88KP\n UINwhIPG+GTjWRSIFqoDemPcb29TMGwX7+jgKivFm0tyzllDkdMipZ+RCgIjq6koj+Gf\n 7ayw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=E2owshsU77/p6fU9EnhCNRWEW8TuRgS6uHbkanjHwbk=;\n b=kOiRlpcZctew9eF95Xi2pqi9umUJ7nq61M6JFHv4wL9vWJjMhgELh3QxvsPGOWBVuc\n MU6Cckq7tkUSNeNcqdrXxZHpBchuTicRusWQnGDpoVHdf4tM6sOFMwrw40lGypKzqbzh\n eZqFbMjXqrwQyrzv4Zc10B9gGpm1O2+DtI6TZnwmh5wMf6/ZWM63DLZUHnwFTtWyzBv/\n gHLmB1e09NjWudPoaiEkxqnyEh3zpCy+ei66zleIT7LxhvftrxY1FHSX+MKUQ4ebvKHR\n PIw+ClAEZKP8CdWANzBDK24FWkf6DMJ024ylLvJH+hkneqscN0uhoEvbPf+b3ijaFDJQ\n F6WQ==",
        "X-Gm-Message-State": "APjAAAWaqgSLaCEwB8xsRXO97zx+sImOxmt7E7aq34JeA7JtfAve/GWA\n 69nnID2kLrgcTgJ+pcHMbrM=",
        "X-Google-Smtp-Source": "\n APXvYqyGAJFDi9rG3+/sO4W0+W7M/1EaFejTjktVHvFo14i4NdA4FLbExGwInmdj/10wuW2osYhokw==",
        "X-Received": "by 2002:a17:90a:9b84:: with SMTP id\n g4mr4637310pjp.76.1574844514251;\n Wed, 27 Nov 2019 00:48:34 -0800 (PST)",
        "From": "Yasufumi Ogawa <yasufum.o@gmail.com>",
        "To": "anatoly.burakov@intel.com, konstantin.ananyev@intel.com,\n david.marchand@redhat.com, dev@dpdk.org",
        "Cc": "yasufumi.ogawa.gy@hco.ntt.co.jp,\n Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>",
        "Date": "Wed, 27 Nov 2019 17:48:26 +0900",
        "Message-Id": "<20191127084826.3519-2-yasufum.o@gmail.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191127084826.3519-1-yasufum.o@gmail.com>",
        "References": "<20191113214346.33749-1-yasufum.o@gmail.com>\n <20191127084826.3519-1-yasufum.o@gmail.com>",
        "Subject": "[dpdk-dev] [PATCH v8 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 <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 <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 in addition to PID.\n\nSigned-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>\n---\n lib/librte_eal/common/include/rte_fbarray.h |  7 ++++++-\n lib/librte_eal/linux/eal/eal_memalloc.c     | 11 ++++++++---\n 2 files changed, 14 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_fbarray.h b/lib/librte_eal/common/include/rte_fbarray.h\nindex 6dccdbec9..df003b8dc 100644\n--- a/lib/librte_eal/common/include/rte_fbarray.h\n+++ b/lib/librte_eal/common/include/rte_fbarray.h\n@@ -39,7 +39,12 @@ extern \"C\" {\n #include <rte_compat.h>\n #include <rte_rwlock.h>\n \n-#define RTE_FBARRAY_NAME_LEN 64\n+/* Filename of fbarray is defined as a combination of several params\n+ * such as \"fbarray_memseg-1048576k-0-0_PID_HOSTNAME\".\n+ * The length of string before PID can be 32bytes, and the length of\n+ * PID can be 7bytes maximamly. Final 1 byte is for null terminator.\n+ */\n+#define RTE_FBARRAY_NAME_LEN (32 + 7 + 1 + HOST_NAME_MAX + 1)\n \n struct rte_fbarray {\n \tchar name[RTE_FBARRAY_NAME_LEN]; /**< name associated with an array */\ndiff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c\nindex af6d0d023..8c50d3355 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 hostname[HOST_NAME_MAX+1] = { 0 };\n \n \tif (msl->external)\n \t\treturn 0;\n@@ -1373,9 +1374,13 @@ secondary_msl_create_walk(const struct rte_memseg_list *msl,\n \tprimary_msl = &mcfg->memsegs[msl_idx];\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/* Create distinct fbarrays for each secondary by using PID and\n+\t * hostname. The reason why using hostname is because PID could be\n+\t * duplicated among secondaries if it is launched in a container.\n+\t */\n+\tgethostname(hostname, sizeof(hostname));\n+\tsnprintf(name, RTE_FBARRAY_NAME_LEN, \"%s_%d_%s\",\n+\t\t\tprimary_msl->memseg_arr.name, (int)getpid(), hostname);\n \n \tret = rte_fbarray_init(&local_msl->memseg_arr, name,\n \t\tprimary_msl->memseg_arr.len,\n",
    "prefixes": [
        "v8",
        "1/1"
    ]
}