get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 102291,
    "url": "https://patches.dpdk.org/api/patches/102291/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211019183543.132084-2-hkalra@marvell.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": "<20211019183543.132084-2-hkalra@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211019183543.132084-2-hkalra@marvell.com",
    "date": "2021-10-19T18:35:36",
    "name": "[v4,1/7] malloc: introduce malloc is ready API",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "312e6a339a8f10e6d42a53d62dbc504ba08cfe43",
    "submitter": {
        "id": 1182,
        "url": "https://patches.dpdk.org/api/people/1182/?format=api",
        "name": "Harman Kalra",
        "email": "hkalra@marvell.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/20211019183543.132084-2-hkalra@marvell.com/mbox/",
    "series": [
        {
            "id": 19805,
            "url": "https://patches.dpdk.org/api/series/19805/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=19805",
            "date": "2021-10-19T18:35:35",
            "name": "make rte_intr_handle internal",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/19805/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/102291/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/102291/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 DCB0EA0547;\n\tTue, 19 Oct 2021 20:36:03 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C455D410EB;\n\tTue, 19 Oct 2021 20:36:03 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 3BC8E410EA\n for <dev@dpdk.org>; Tue, 19 Oct 2021 20:36:02 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id\n 19JGSaIu025397;\n Tue, 19 Oct 2021 11:35:59 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com with ESMTP id 3bt1jtrk9j-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Tue, 19 Oct 2021 11:35:59 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Tue, 19 Oct 2021 11:35:58 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Tue, 19 Oct 2021 11:35:58 -0700",
            "from localhost.localdomain (unknown [10.29.52.211])\n by maili.marvell.com (Postfix) with ESMTP id A9AD63F7043;\n Tue, 19 Oct 2021 11:35:53 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-type; s=pfpt0220; bh=PWPRS5zf11SJAi/s7d3WRGfQ+sIr5kE10pkYlCJMwFM=;\n b=V9MNQ/zDpU/KR2x2oYZ2UxYdUN2h6YineVYM2SDPqv4CN6IYQAqsic0E5NZ1iYyq5JOY\n R8jNiqakm923xW8Tt9z01OQ9qJd/qAnHaqlQKYUxy1MJLTGQs85m6gRYCfEXgoP4o10i\n iCNJZrpmasG8TVGTVAF3Tv4/OH2Ywd6FmJ8BxoaiDNETGgE7jBRX6Wd15ctIrHRxFmAm\n DhQjWAtmZKaDgahn1hIrXKiQAl+2YH/b81cw3JsjMYZkedp1deJX9fD+ovbRcH2BhOXX\n cTxONXcYv20O3INF9IuRGvc1sgzOY4YFhjztqKQe0By0w5Vgr/FjpR3HNI5zd7IfEfhv dQ==",
        "From": "Harman Kalra <hkalra@marvell.com>",
        "To": "<dev@dpdk.org>, Anatoly Burakov <anatoly.burakov@intel.com>",
        "CC": "<david.marchand@redhat.com>, <dmitry.kozliuk@gmail.com>, <mdr@ashroe.eu>,\n <thomas@monjalon.net>, Harman Kalra <hkalra@marvell.com>",
        "Date": "Wed, 20 Oct 2021 00:05:36 +0530",
        "Message-ID": "<20211019183543.132084-2-hkalra@marvell.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20211019183543.132084-1-hkalra@marvell.com>",
        "References": "<20210826145726.102081-1-hkalra@marvell.com>\n <20211019183543.132084-1-hkalra@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "o-pMUlXaBKMz3RjLe2UVR02PEnX3xuwa",
        "X-Proofpoint-ORIG-GUID": "o-pMUlXaBKMz3RjLe2UVR02PEnX3xuwa",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475\n definitions=2021-10-19_02,2021-10-19_01,2020-04-07_01",
        "Subject": "[dpdk-dev] [PATCH v4 1/7] malloc: introduce malloc is ready API",
        "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": "Implementing a new API get the state if DPDK memory management\nAPIs are initialized.\nOne of the use case of this API is while allocating an interrupt\ninstance, if malloc APIs are ready memory for interrupt handles\nshould be allocated via rte_malloc_* APIs else glibc malloc APIs\nare used. Eg. Alarm subsystem is initialised before DPDK memory\ninfra setup and it allocates an interrupt handle.\n\nSigned-off-by: Harman Kalra <hkalra@marvell.com>\n---\n lib/eal/common/malloc_heap.c | 16 +++++++++++++++-\n lib/eal/common/malloc_heap.h |  6 ++++++\n 2 files changed, 21 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c\nindex ee400f38ec..35affecf91 100644\n--- a/lib/eal/common/malloc_heap.c\n+++ b/lib/eal/common/malloc_heap.c\n@@ -36,6 +36,8 @@\n #define CONST_MAX(a, b) (a > b ? a : b) /* RTE_MAX is not a constant */\n #define EXTERNAL_HEAP_MIN_SOCKET_ID (CONST_MAX((1 << 8), RTE_MAX_NUMA_NODES))\n \n+static bool malloc_ready;\n+\n static unsigned\n check_hugepage_sz(unsigned flags, uint64_t hugepage_sz)\n {\n@@ -1328,6 +1330,7 @@ rte_eal_malloc_heap_init(void)\n {\n \tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n \tunsigned int i;\n+\tint ret;\n \tconst struct internal_config *internal_conf =\n \t\teal_get_internal_configuration();\n \n@@ -1369,5 +1372,16 @@ rte_eal_malloc_heap_init(void)\n \t\treturn 0;\n \n \t/* add all IOVA-contiguous areas to the heap */\n-\treturn rte_memseg_contig_walk(malloc_add_seg, NULL);\n+\tret = rte_memseg_contig_walk(malloc_add_seg, NULL);\n+\n+\tif (ret == 0)\n+\t\tmalloc_ready = true;\n+\n+\treturn ret;\n+}\n+\n+bool\n+rte_malloc_is_ready(void)\n+{\n+\treturn malloc_ready == true;\n }\ndiff --git a/lib/eal/common/malloc_heap.h b/lib/eal/common/malloc_heap.h\nindex 3a6ec6ecf0..bc23944958 100644\n--- a/lib/eal/common/malloc_heap.h\n+++ b/lib/eal/common/malloc_heap.h\n@@ -96,4 +96,10 @@ malloc_socket_to_heap_id(unsigned int socket_id);\n int\n rte_eal_malloc_heap_init(void);\n \n+/* This API is used to know if DPDK memory subsystem is setup and its\n+ * corresponding APIs are ready to be used.\n+ */\n+bool\n+rte_malloc_is_ready(void);\n+\n #endif /* MALLOC_HEAP_H_ */\n",
    "prefixes": [
        "v4",
        "1/7"
    ]
}