get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 48762,
    "url": "http://patchwork.dpdk.org/api/patches/48762/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/e6640a693f65d8263eecafce77c1295e469adf25.1544701282.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<e6640a693f65d8263eecafce77c1295e469adf25.1544701282.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/e6640a693f65d8263eecafce77c1295e469adf25.1544701282.git.anatoly.burakov@intel.com",
    "date": "2018-12-13T11:43:17",
    "name": "[v3,3/5] memalloc: allow setting up segment list fd's",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d84ec2ad473fe0aac1666f8bc4bcdd2ae904fe07",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/e6640a693f65d8263eecafce77c1295e469adf25.1544701282.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 2758,
            "url": "http://patchwork.dpdk.org/api/series/2758/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=2758",
            "date": "2018-12-13T11:43:14",
            "name": "Allow using virtio-user without hugepages",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/2758/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/48762/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/48762/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 E3D3A1B4FB;\n\tThu, 13 Dec 2018 12:43:27 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 15A731B4F3\n\tfor <dev@dpdk.org>; Thu, 13 Dec 2018 12:43:23 +0100 (CET)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Dec 2018 03:43:22 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga003.jf.intel.com with ESMTP; 13 Dec 2018 03:43:20 -0800",
            "from sivswdev05.ir.intel.com (sivswdev05.ir.intel.com\n\t[10.243.17.64])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\twBDBhKRY032157; Thu, 13 Dec 2018 11:43:20 GMT",
            "from sivswdev05.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev05.ir.intel.com with ESMTP id wBDBhKZt012555;\n\tThu, 13 Dec 2018 11:43:20 GMT",
            "(from aburakov@localhost)\n\tby sivswdev05.ir.intel.com with LOCAL id wBDBhKWQ012551;\n\tThu, 13 Dec 2018 11:43:20 GMT"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.56,348,1539673200\"; d=\"scan'208\";a=\"110066378\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>, przemyslawx.lal@intel.com,\n\tkuralamudhan.ramakrishnan@intel.com, ivan.coughlan@intel.com,\n\ttiwei.bie@intel.com, ray.kinsella@intel.com, maxime.coquelin@redhat.com",
        "Date": "Thu, 13 Dec 2018 11:43:17 +0000",
        "Message-Id": "<e6640a693f65d8263eecafce77c1295e469adf25.1544701282.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<cover.1544701282.git.anatoly.burakov@intel.com>",
            "<cover.1544701282.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1544701282.git.anatoly.burakov@intel.com>",
            "<cover.1544546363.git.anatoly.burakov@intel.com>\n\t<cover.1544701282.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v3 3/5] memalloc: allow setting up segment list\n\tfd's",
        "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": "Currently, only segment fd's for multi-file segments are supported,\nwhile for memfd-backed no-huge memory we need single-file segments\nmode. Add support for single-file segments in the internal API.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nAcked-by: Tiwei Bie <tiwei.bie@intel.com>\n---\n\nNotes:\n    v2:\n    - Add missing fd list allocation on setting segment\n      list fd\n\n lib/librte_eal/bsdapp/eal/eal_memalloc.c   |  6 +++++\n lib/librte_eal/common/eal_memalloc.h       |  4 ++++\n lib/librte_eal/linuxapp/eal/eal_memalloc.c | 26 ++++++++++++++++++++++\n 3 files changed, 36 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/bsdapp/eal/eal_memalloc.c b/lib/librte_eal/bsdapp/eal/eal_memalloc.c\nindex a5847f0bd..6893448db 100644\n--- a/lib/librte_eal/bsdapp/eal/eal_memalloc.c\n+++ b/lib/librte_eal/bsdapp/eal/eal_memalloc.c\n@@ -61,6 +61,12 @@ eal_memalloc_set_seg_fd(int list_idx __rte_unused, int seg_idx __rte_unused,\n \treturn -ENOTSUP;\n }\n \n+int\n+eal_memalloc_set_seg_list_fd(int list_idx __rte_unused, int fd __rte_unused)\n+{\n+\treturn -ENOTSUP;\n+}\n+\n int\n eal_memalloc_get_seg_fd_offset(int list_idx __rte_unused,\n \t\tint seg_idx __rte_unused, size_t *offset __rte_unused)\ndiff --git a/lib/librte_eal/common/eal_memalloc.h b/lib/librte_eal/common/eal_memalloc.h\nindex af917c2f9..b96c9c512 100644\n--- a/lib/librte_eal/common/eal_memalloc.h\n+++ b/lib/librte_eal/common/eal_memalloc.h\n@@ -84,6 +84,10 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx);\n int\n eal_memalloc_set_seg_fd(int list_idx, int seg_idx, int fd);\n \n+/* returns 0 or -errno */\n+int\n+eal_memalloc_set_seg_list_fd(int list_idx, int fd);\n+\n int\n eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset);\n \ndiff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c\nindex a93548b8c..eef140b33 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c\n@@ -1529,6 +1529,10 @@ eal_memalloc_set_seg_fd(int list_idx, int seg_idx, int fd)\n {\n \tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n \n+\t/* single file segments mode doesn't support individual segment fd's */\n+\tif (internal_config.single_file_segments)\n+\t\treturn -ENOTSUP;\n+\n \t/* if list is not allocated, allocate it */\n \tif (fd_list[list_idx].len == 0) {\n \t\tint len = mcfg->memsegs[list_idx].memseg_arr.len;\n@@ -1541,6 +1545,28 @@ eal_memalloc_set_seg_fd(int list_idx, int seg_idx, int fd)\n \treturn 0;\n }\n \n+int\n+eal_memalloc_set_seg_list_fd(int list_idx, int fd)\n+{\n+\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\n+\t/* non-single file segment mode doesn't support segment list fd's */\n+\tif (!internal_config.single_file_segments)\n+\t\treturn -ENOTSUP;\n+\n+\t/* if list is not allocated, allocate it */\n+\tif (fd_list[list_idx].len == 0) {\n+\t\tint len = mcfg->memsegs[list_idx].memseg_arr.len;\n+\n+\t\tif (alloc_list(list_idx, len) < 0)\n+\t\t\treturn -ENOMEM;\n+\t}\n+\n+\tfd_list[list_idx].memseg_list_fd = fd;\n+\n+\treturn 0;\n+}\n+\n int\n eal_memalloc_get_seg_fd(int list_idx, int seg_idx)\n {\n",
    "prefixes": [
        "v3",
        "3/5"
    ]
}