get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 117358,
    "url": "http://patches.dpdk.org/api/patches/117358/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/tencent_0EBF5CE1151A68AC3F5516EBD663B3E55C05@qq.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": "<tencent_0EBF5CE1151A68AC3F5516EBD663B3E55C05@qq.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/tencent_0EBF5CE1151A68AC3F5516EBD663B3E55C05@qq.com",
    "date": "2022-10-05T04:09:44",
    "name": "[v5,02/10] test/memarea: support memarea test",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "79c6b91013f451edc6a846c3f15d6417c76a6fea",
    "submitter": {
        "id": 2867,
        "url": "http://patches.dpdk.org/api/people/2867/?format=api",
        "name": "datshan",
        "email": "datshan@qq.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/tencent_0EBF5CE1151A68AC3F5516EBD663B3E55C05@qq.com/mbox/",
    "series": [
        {
            "id": 24981,
            "url": "http://patches.dpdk.org/api/series/24981/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24981",
            "date": "2022-10-05T04:09:43",
            "name": "[v5,01/10] memarea: introduce memarea library",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/24981/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/117358/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/117358/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 4212FA0542;\n\tWed,  5 Oct 2022 06:10:13 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 55E08427EB;\n\tWed,  5 Oct 2022 06:10:02 +0200 (CEST)",
            "from out203-205-221-245.mail.qq.com (out203-205-221-245.mail.qq.com\n [203.205.221.245])\n by mails.dpdk.org (Postfix) with ESMTP id 03EEF40041\n for <dev@dpdk.org>; Wed,  5 Oct 2022 06:09:59 +0200 (CEST)",
            "from qq.com ([120.229.93.179])\n by newxmesmtplogicsvrsza31.qq.com (NewEsmtp) with SMTP\n id 27598E97; Wed, 05 Oct 2022 12:09:53 +0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512;\n t=1664942998; bh=rG2ZkGplRcelW1XLl2pfPrMLzFQd6n7/OgK5xTE5jeg=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=gjaghcm4cUkIkakCWVVcm8UtSCbC4ysBPUH6/lVt+Q9gSugBV4uKCeLJeFvtw/PfB\n n3NWSxw/QhWvCMv5QPKv5RI61320IWZ0roUQ4sXo4iJ6VT5ohJbyZzdM0c/7U6qsJ/\n w/c6bxJ67O1+krvWUxYkKBDtNGG2Q/+SnjvLwXhc=",
        "X-QQ-mid": "xmsmtpt1664942997t5p461mi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n dRjyhYLsITPl5Lh8hDK+dDbusqV3OUAC8DEJjPbn+ZrMVnLwd2++g1GCYV4h5j1blVpnNlXSzV0M\n AISwZPTP5pBprilCxS",
        "From": "datshan <datshan@qq.com>",
        "To": "david.marchand@redhat.com, mb@smartsharesystems.com,\n anatoly.burakov@intel.com, dmitry.kozliuk@gmail.com, jerinjacobk@gmail.com",
        "Cc": "thomas@monjalon.net, dev@dpdk.org, Chengwen Feng <fengchengwen@huawei.com>",
        "Subject": "[PATCH v5 02/10] test/memarea: support memarea test",
        "Date": "Wed,  5 Oct 2022 12:09:44 +0800",
        "X-OQ-MSGID": "<20221005040952.8166-3-datshan@qq.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20221005040952.8166-1-datshan@qq.com>",
        "References": "<20220721044648.6817-1-fengchengwen@huawei.com>\n <20221005040952.8166-1-datshan@qq.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "From: Chengwen Feng <fengchengwen@huawei.com>\n\nThis patch supports memarea test about API rte_memarea_create and\nrte_memarea_destroy.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n MAINTAINERS             |   1 +\n app/test/meson.build    |   2 +\n app/test/test_memarea.c | 149 ++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 152 insertions(+)\n create mode 100644 app/test/test_memarea.c",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex b9c638221d..bfdb36f1b5 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -1554,6 +1554,7 @@ Memarea - EXPERIMENTAL\n M: Chengwen Feng <fengchengwen@huawei.com>\n F: lib/memarea\n F: doc/guides/prog_guide/memarea_lib.rst\n+F: app/test/test_memarea*\n \n Membership - EXPERIMENTAL\n M: Yipeng Wang <yipeng1.wang@intel.com>\ndiff --git a/app/test/meson.build b/app/test/meson.build\nindex d5cad72116..778de8d65d 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -84,6 +84,7 @@ test_sources = files(\n         'test_malloc.c',\n         'test_malloc_perf.c',\n         'test_mbuf.c',\n+        'test_memarea.c',\n         'test_member.c',\n         'test_member_perf.c',\n         'test_memcpy.c',\n@@ -199,6 +200,7 @@ fast_tests = [\n         ['malloc_autotest', false, true],\n         ['mbuf_autotest', false, true],\n         ['mcslock_autotest', false, true],\n+        ['memarea_autotest', true, true],\n         ['memcpy_autotest', true, true],\n         ['memory_autotest', false, true],\n         ['mempool_autotest', false, true],\ndiff --git a/app/test/test_memarea.c b/app/test/test_memarea.c\nnew file mode 100644\nindex 0000000000..7c3d78652d\n--- /dev/null\n+++ b/app/test/test_memarea.c\n@@ -0,0 +1,149 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2022 HiSilicon Limited\n+ */\n+\n+#include <stdio.h>\n+#include <string.h>\n+\n+#include \"test.h\"\n+\n+#ifdef RTE_EXEC_ENV_WINDOWS\n+static int\n+test_memarea(void)\n+{\n+\tprintf(\"memarea not supported on Windows, skipping test\\n\");\n+\treturn TEST_SKIPPED;\n+}\n+\n+#else\n+\n+#include <rte_memory.h>\n+#include <rte_memarea.h>\n+\n+#define MEMAREA_TEST_DEFAULT_SIZE\t0x1000\n+\n+#define MEMAREA_TEST_API_RUN(test_func) \\\n+\tdo { \\\n+\t\tint ret = test_func(); \\\n+\t\tif (ret < 0) \\\n+\t\t\tprintf(\"%s Failed\\n\", #test_func); \\\n+\t\telse \\\n+\t\t\tprintf(\"%s Passed\\n\", #test_func); \\\n+\t} while (0)\n+\n+static void\n+test_memarea_init_def_param(struct rte_memarea_param *init)\n+{\n+\tmemset(init, 0, sizeof(struct rte_memarea_param));\n+\tsprintf(init->name, \"%s\", \"test-memarea\");\n+\tinit->source = RTE_MEMAREA_SOURCE_SYSTEM_API;\n+\tinit->total_sz = MEMAREA_TEST_DEFAULT_SIZE;\n+\tinit->mt_safe = 1;\n+}\n+\n+static int\n+test_memarea_create_bad_param(void)\n+{\n+\tstruct rte_memarea_param init;\n+\tstruct rte_memarea *ma;\n+\tint i;\n+\n+\t/* test for NULL */\n+\tma = rte_memarea_create(NULL);\n+\tRTE_TEST_ASSERT(ma == NULL, \"Expected NULL\");\n+\n+\t/* test for invalid name */\n+\tmemset(&init, 0, sizeof(init));\n+\tma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(ma == NULL, \"Expected NULL\");\n+\tmemset(&init.name, 1, sizeof(init.name));\n+\tma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(ma == NULL, \"Expected NULL\");\n+\n+\t/* test for invalid source */\n+\ttest_memarea_init_def_param(&init);\n+\tinit.source = RTE_MEMAREA_SOURCE_USER_MEMAREA + 1;\n+\tma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(ma == NULL, \"Expected NULL\");\n+\n+\t/* test for total_sz */\n+\ttest_memarea_init_def_param(&init);\n+\tinit.total_sz = 0;\n+\tma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(ma == NULL, \"Expected NULL\");\n+\n+\t/* test for user address NULL */\n+\ttest_memarea_init_def_param(&init);\n+\tinit.source = RTE_MEMAREA_SOURCE_USER_ADDR;\n+\tma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(ma == NULL, \"Expected NULL\");\n+\n+\t/* test for user address align invalid */\n+\ttest_memarea_init_def_param(&init);\n+\tinit.source = RTE_MEMAREA_SOURCE_USER_ADDR;\n+\tfor (i = 1; i < RTE_CACHE_LINE_SIZE; i++) {\n+\t\tinit.user_addr = (void *)((uintptr_t)i);\n+\t\tma = rte_memarea_create(&init);\n+\t\tRTE_TEST_ASSERT(ma == NULL, \"Expected NULL\");\n+\t}\n+\n+\t/* test for user memarea NULL */\n+\ttest_memarea_init_def_param(&init);\n+\tinit.source = RTE_MEMAREA_SOURCE_USER_MEMAREA;\n+\tma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(ma == NULL, \"Expected NULL\");\n+\n+\t/* test for alg invalid */\n+\ttest_memarea_init_def_param(&init);\n+\tinit.alg = RTE_MEMAREA_ALG_DEFAULT + 1;\n+\tma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(ma == NULL, \"Expected NULL\");\n+\n+\treturn 0;\n+}\n+\n+static int\n+test_memarea_create_destroy(void)\n+{\n+\tuint8_t user_buffer[MEMAREA_TEST_DEFAULT_SIZE + RTE_CACHE_LINE_SIZE];\n+\tstruct rte_memarea_param init;\n+\tstruct rte_memarea *ma;\n+\n+\t/* test for create with RTE memory */\n+\ttest_memarea_init_def_param(&init);\n+\tinit.source = RTE_MEMAREA_SOURCE_RTE_MEMORY;\n+\tinit.numa_socket = SOCKET_ID_ANY;\n+\tma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(ma != NULL, \"Expected Non-NULL\");\n+\trte_memarea_destroy(ma);\n+\n+\t/* test for create with system API */\n+\ttest_memarea_init_def_param(&init);\n+\tinit.source = RTE_MEMAREA_SOURCE_SYSTEM_API;\n+\tma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(ma != NULL, \"Expected Non-NULL\");\n+\trte_memarea_destroy(ma);\n+\n+\t/* test for create with user-address */\n+\ttest_memarea_init_def_param(&init);\n+\tinit.source = RTE_MEMAREA_SOURCE_USER_ADDR;\n+\tinit.user_addr = (void *)(((uintptr_t)user_buffer + RTE_CACHE_LINE_SIZE) &\n+\t\t\t\t  ~(RTE_CACHE_LINE_SIZE - 1));\n+\tma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(ma != NULL, \"Expected Non-NULL\");\n+\trte_memarea_destroy(ma);\n+\n+\treturn 0;\n+}\n+\n+static int\n+test_memarea(void)\n+{\n+\tMEMAREA_TEST_API_RUN(test_memarea_create_bad_param);\n+\tMEMAREA_TEST_API_RUN(test_memarea_create_destroy);\n+\treturn 0;\n+}\n+\n+#endif /* !RTE_EXEC_ENV_WINDOWS */\n+\n+REGISTER_TEST_COMMAND(memarea_autotest, test_memarea);\n",
    "prefixes": [
        "v5",
        "02/10"
    ]
}