get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 94861,
    "url": "https://patches.dpdk.org/api/patches/94861/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210625104449.2096166-1-john.levon@nutanix.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": "<20210625104449.2096166-1-john.levon@nutanix.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210625104449.2096166-1-john.levon@nutanix.com",
    "date": "2021-06-25T10:44:50",
    "name": "[RESEND] eal: allow hugetlbfs sub-directories",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9545ac2bec4ef866f3b94215249bc67bb9bfaa8b",
    "submitter": {
        "id": 2239,
        "url": "https://patches.dpdk.org/api/people/2239/?format=api",
        "name": "John Levon",
        "email": "john.levon@nutanix.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210625104449.2096166-1-john.levon@nutanix.com/mbox/",
    "series": [
        {
            "id": 17487,
            "url": "https://patches.dpdk.org/api/series/17487/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17487",
            "date": "2021-06-25T10:44:50",
            "name": "[RESEND] eal: allow hugetlbfs sub-directories",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/17487/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94861/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/94861/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id EE114A0547;\n\tFri, 25 Jun 2021 12:46:38 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6B3A840698;\n\tFri, 25 Jun 2021 12:46:38 +0200 (CEST)",
            "from sent.movementarian.org (unknown [88.98.93.30])\n by mails.dpdk.org (Postfix) with ESMTP id CCC334068A\n for <dev@dpdk.org>; Fri, 25 Jun 2021 12:46:37 +0200 (CEST)",
            "from jlevon by sent.movementarian.org with local (Exim 4.93)\n (envelope-from <levon@movementarian.org>)\n id 1lwjLy-008nLJ-Pl; Fri, 25 Jun 2021 11:46:30 +0100"
        ],
        "From": "John Levon <john.levon@nutanix.com>",
        "To": "john.levon@nutanix.com",
        "Cc": "anatoly.burakov@intel.com,\n\tdev@dpdk.org,\n\tlevon@movementarian.org",
        "Date": "Fri, 25 Jun 2021 11:44:50 +0100",
        "Message-Id": "<20210625104449.2096166-1-john.levon@nutanix.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210610210521.830303-1-john.levon@nutanix.com>",
        "References": "<20210610210521.830303-1-john.levon@nutanix.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH RESEND] eal: allow hugetlbfs sub-directories",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "get_hugepage_dir() was implemented in such a way that a --huge-dir option\nhad to exactly match the mountpoint, but there's no reason for this\nrestriction. Fix the implementation to allow a sub-directory within a\nsuitable hugetlbfs mountpoint to be specified.\n\nSigned-off-by: John Levon <john.levon@nutanix.com>\n---\n lib/eal/linux/eal_hugepage_info.c | 25 +++++++++++++++++++------\n 1 file changed, 19 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c\nindex d97792cad..d7e9918f8 100644\n--- a/lib/eal/linux/eal_hugepage_info.c\n+++ b/lib/eal/linux/eal_hugepage_info.c\n@@ -226,16 +226,29 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)\n \t\tdefault_size = get_default_hp_size();\n \n \twhile (fgets(buf, sizeof(buf), fd)){\n+\t\tconst char *dir;\n+\n \t\tif (rte_strsplit(buf, sizeof(buf), splitstr, _FIELDNAME_MAX,\n \t\t\t\tsplit_tok) != _FIELDNAME_MAX) {\n \t\t\tRTE_LOG(ERR, EAL, \"Error parsing %s\\n\", proc_mounts);\n \t\t\tbreak; /* return NULL */\n \t\t}\n \n-\t\t/* we have a specified --huge-dir option, only examine that dir */\n-\t\tif (internal_conf->hugepage_dir != NULL &&\n-\t\t\t\tstrcmp(splitstr[MOUNTPT], internal_conf->hugepage_dir) != 0)\n-\t\t\tcontinue;\n+\t\tdir = splitstr[MOUNTPT];\n+\n+\t\t/*\n+\t\t * If a --huge-dir option has been specified, only examine\n+\t\t * mounts that contain that directory, and make sure to return\n+\t\t * the directory, not the mount.\n+\t\t */\n+\t\tif (internal_conf->hugepage_dir != NULL) {\n+\t\t\tif (strncmp(internal_conf->hugepage_dir,\n+\t\t\t\tsplitstr[MOUNTPT],\n+\t\t\t\tstrlen(splitstr[MOUNTPT])) != 0)\n+\t\t\t\tcontinue;\n+\n+\t\t\tdir = internal_conf->hugepage_dir;\n+\t\t}\n \n \t\tif (strncmp(splitstr[FSTYPE], hugetlbfs_str, htlbfs_str_len) == 0){\n \t\t\tconst char *pagesz_str = strstr(splitstr[OPTIONS], pagesize_opt);\n@@ -243,7 +256,7 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)\n \t\t\t/* if no explicit page size, the default page size is compared */\n \t\t\tif (pagesz_str == NULL){\n \t\t\t\tif (hugepage_sz == default_size){\n-\t\t\t\t\tstrlcpy(hugedir, splitstr[MOUNTPT], len);\n+\t\t\t\t\tstrlcpy(hugedir, dir, len);\n \t\t\t\t\tretval = 0;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n@@ -252,7 +265,7 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)\n \t\t\telse {\n \t\t\t\tuint64_t pagesz = rte_str_to_size(&pagesz_str[pagesize_opt_len]);\n \t\t\t\tif (pagesz == hugepage_sz) {\n-\t\t\t\t\tstrlcpy(hugedir, splitstr[MOUNTPT], len);\n+\t\t\t\t\tstrlcpy(hugedir, dir, len);\n \t\t\t\t\tretval = 0;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n",
    "prefixes": [
        "RESEND"
    ]
}