get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105128,
    "url": "http://patches.dpdk.org/api/patches/105128/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211214120817.1476-1-gaoxiangliu0@163.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": "<20211214120817.1476-1-gaoxiangliu0@163.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211214120817.1476-1-gaoxiangliu0@163.com",
    "date": "2021-12-14T12:08:16",
    "name": "[v2] mem: exclude used memory from core dump by config",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "700bafec0187f1e815ff171f47996f202491d464",
    "submitter": {
        "id": 2304,
        "url": "http://patches.dpdk.org/api/people/2304/?format=api",
        "name": "Gaoxiang Liu",
        "email": "gaoxiangliu0@163.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/20211214120817.1476-1-gaoxiangliu0@163.com/mbox/",
    "series": [
        {
            "id": 20942,
            "url": "http://patches.dpdk.org/api/series/20942/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20942",
            "date": "2021-12-14T12:08:16",
            "name": "[v2] mem: exclude used memory from core dump by config",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/20942/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/105128/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/105128/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 BA00CA00C3;\n\tTue, 14 Dec 2021 13:08:50 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D96C541147;\n\tTue, 14 Dec 2021 13:08:44 +0100 (CET)",
            "from m12-14.163.com (m12-14.163.com [220.181.12.14])\n by mails.dpdk.org (Postfix) with ESMTP id 8C1FD4003C;\n Tue, 14 Dec 2021 13:08:35 +0100 (CET)",
            "from DESKTOP-ONA2IA7.localdomain (unknown [223.104.244.167])\n by smtp10 (Coremail) with SMTP id DsCowAB3LcIzibhhSVneCA--.35759S4;\n Tue, 14 Dec 2021 20:08:28 +0800 (CST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;\n s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=Qk+Fj\n PShaZaTPDfJTnhtvNS8ov/EObUWNniRt0VOeJs=; b=TxCVQQdG9f2FTVUNWYOGf\n C7J2PRLnrfrDCwCbgQBs/0E5mhGf1ecMNP6szfdk8uzzXroDLp8CSqK1bozcZ4i0\n yXduZ0Yc73BKvVNKhXl8k6SzoIbqGmS4h6c5TQ1OJTCPKrbwtDr0WyXQ4Vls0LIA\n uN6i28vC9qwNPYOBkxR1pc=",
        "From": "Gaoxiang Liu <gaoxiangliu0@163.com>",
        "To": "dev@dpdk.org,\n\tAnatoly Burakov <anatoly.burakov@intel.com>",
        "Cc": "liugaoxiang@huawei.com, Gaoxiang Liu <gaoxiangliu0@163.com>,\n stable@dpdk.org",
        "Subject": "[PATCH v2] mem: exclude used memory from core dump by config",
        "Date": "Tue, 14 Dec 2021 20:08:16 +0800",
        "Message-Id": "<20211214120817.1476-1-gaoxiangliu0@163.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20211214114151.1298-1-gaoxiangliu0@163.com>",
        "References": "<20211214114151.1298-1-gaoxiangliu0@163.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CM-TRANSID": "DsCowAB3LcIzibhhSVneCA--.35759S4",
        "X-Coremail-Antispam": "1Uf129KBjvJXoWxZF1DWr43XFWxAFyDCFW7urg_yoW5Cr48pF\n ZrCFy5XFy7tr1S93srXw40va1rKa4fGF1UG3y7Xw1qvrZxt3yfW34DKa4aga43ZrWUJF4D\n Zr18KFZ09a4UAw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jx8n5UUUUU=",
        "X-Originating-IP": "[223.104.244.167]",
        "X-CM-SenderInfo": "xjdr5xxdqjzxjxq6il2tof0z/xtbBQhxpOl++OUPVKQAAsq",
        "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"
    },
    "content": "Some DPDK application is allolcateed storage partition of 8G(or smaller)\nIf coredump happens, the application doesn't work because of\ninsufficient storage space.\nThe patch provides a config that means whether the huge used memory\nneeds to be not dumped in core dump.\nThe DPDK application can choose to open it according to the actual\nsituation.\n\nFixes: d72e4042c5eb (\"mem: exclude unused memory from core dump\")\nCc: stable@dpdk.org\n\nSigned-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>\n\n---\nv2:\n* Fixed compile issues.\n---\n lib/eal/common/eal_internal_cfg.h |  1 +\n lib/eal/common/eal_options.h      |  3 ++-\n lib/eal/linux/eal.c               |  4 ++++\n lib/eal/linux/eal_memalloc.c      | 10 ++++++++++\n 4 files changed, 17 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/eal/common/eal_internal_cfg.h b/lib/eal/common/eal_internal_cfg.h\nindex d6c0470eb8..f9cd300f86 100644\n--- a/lib/eal/common/eal_internal_cfg.h\n+++ b/lib/eal/common/eal_internal_cfg.h\n@@ -87,6 +87,7 @@ struct internal_config {\n \t\t\t/**< user defined mbuf pool ops name */\n \tunsigned num_hugepage_sizes;      /**< how many sizes on this system */\n \tstruct hugepage_info hugepage_info[MAX_HUGEPAGE_SIZES];\n+\tvolatile unsigned huge_dont_dump_flag;\n \tenum rte_iova_mode iova_mode ;    /**< Set IOVA mode on this system  */\n \trte_cpuset_t ctrl_cpuset;         /**< cpuset for ctrl threads */\n \tvolatile unsigned int init_complete;\ndiff --git a/lib/eal/common/eal_options.h b/lib/eal/common/eal_options.h\nindex 8e4f7202a2..6b9a24f0f9 100644\n--- a/lib/eal/common/eal_options.h\n+++ b/lib/eal/common/eal_options.h\n@@ -87,7 +87,8 @@ enum {\n \tOPT_NO_TELEMETRY_NUM,\n #define OPT_FORCE_MAX_SIMD_BITWIDTH  \"force-max-simd-bitwidth\"\n \tOPT_FORCE_MAX_SIMD_BITWIDTH_NUM,\n-\n+#define OPT_HUGE_DONT_DUMP     \"huge-dont-dump\"\n+\tOPT_HUGE_DONT_DUMP_NUM,\n \tOPT_LONG_MAX_NUM\n };\n \ndiff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c\nindex 60b4924838..d496e7bab9 100644\n--- a/lib/eal/linux/eal.c\n+++ b/lib/eal/linux/eal.c\n@@ -817,6 +817,10 @@ eal_parse_args(int argc, char **argv)\n \t\t\tinternal_conf->match_allocations = 1;\n \t\t\tbreak;\n \n+\t\tcase OPT_HUGE_DONT_DUMP_NUM:\n+\t\t\tinternal_conf->huge_dont_dump_flag = 1;\n+\t\t\tbreak;\n+\n \t\tdefault:\n \t\t\tif (opt < OPT_LONG_MIN_NUM && isprint(opt)) {\n \t\t\t\tRTE_LOG(ERR, EAL, \"Option %c is not supported \"\ndiff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c\nindex 337f2bc739..01e010e2c1 100644\n--- a/lib/eal/linux/eal_memalloc.c\n+++ b/lib/eal/linux/eal_memalloc.c\n@@ -663,6 +663,16 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,\n \tms->iova = iova;\n \tms->socket_id = socket_id;\n \n+\tif (internal_conf->huge_dont_dump_flag) {\n+\t\tif (madvise(addr, alloc_sz, MADV_DONTDUMP)) {\n+\t\t\tRTE_LOG(INFO, EAL, \"madvise(%p, %#zx, %d) failed: %s\\n\",\n+\t\t\t\t\taddr, alloc_sz, flags, strerror(rte_errno));\n+\t\t} else {\n+\t\t\tRTE_LOG(INFO, EAL, \"%s(): madvise(MADV_DONTDUMP) memory success.(len=%#zx)\\n\",\n+\t\t\t\t\t__func__, alloc_sz);\n+\t\t}\n+\t}\n+\n \treturn 0;\n \n mapped:\n",
    "prefixes": [
        "v2"
    ]
}