get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 117931,
    "url": "http://patchwork.dpdk.org/api/patches/117931/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20221011121720.2657-10-fengchengwen@huawei.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": "<20221011121720.2657-10-fengchengwen@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221011121720.2657-10-fengchengwen@huawei.com",
    "date": "2022-10-11T12:17:20",
    "name": "[v8,9/9] app/test: add memarea to malloc-perf-autotest",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d94214226c761d8d249ac0391bbf86655375135e",
    "submitter": {
        "id": 2146,
        "url": "http://patchwork.dpdk.org/api/people/2146/?format=api",
        "name": "fengchengwen",
        "email": "fengchengwen@huawei.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/20221011121720.2657-10-fengchengwen@huawei.com/mbox/",
    "series": [
        {
            "id": 25146,
            "url": "http://patchwork.dpdk.org/api/series/25146/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=25146",
            "date": "2022-10-11T12:17:17",
            "name": "introduce memarea library",
            "version": 8,
            "mbox": "http://patchwork.dpdk.org/series/25146/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/117931/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/117931/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 E3B81A0545;\n\tTue, 11 Oct 2022 14:24:02 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 01B4842E23;\n\tTue, 11 Oct 2022 14:23:16 +0200 (CEST)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id D729942DE4\n for <dev@dpdk.org>; Tue, 11 Oct 2022 14:23:05 +0200 (CEST)",
            "from dggpeml500024.china.huawei.com (unknown [172.30.72.57])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MmvvV3s1HzlVvJ;\n Tue, 11 Oct 2022 20:18:30 +0800 (CST)",
            "from localhost.localdomain (10.67.165.24) by\n dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2375.31; Tue, 11 Oct 2022 20:23:04 +0800"
        ],
        "From": "Chengwen Feng <fengchengwen@huawei.com>",
        "To": "<david.marchand@redhat.com>, <mb@smartsharesystems.com>,\n <anatoly.burakov@intel.com>, <dmitry.kozliuk@gmail.com>,\n <jerinjacobk@gmail.com>, <hofors@lysator.liu.se>",
        "CC": "<thomas@monjalon.net>, <dev@dpdk.org>",
        "Subject": "[PATCH v8 9/9] app/test: add memarea to malloc-perf-autotest",
        "Date": "Tue, 11 Oct 2022 12:17:20 +0000",
        "Message-ID": "<20221011121720.2657-10-fengchengwen@huawei.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20221011121720.2657-1-fengchengwen@huawei.com>",
        "References": "<20220721044648.6817-1-fengchengwen@huawei.com>\n <20221011121720.2657-1-fengchengwen@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.67.165.24]",
        "X-ClientProxiedBy": "dggems701-chm.china.huawei.com (10.3.19.178) To\n dggpeml500024.china.huawei.com (7.185.36.10)",
        "X-CFilter-Loop": "Reflected",
        "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": "This patch adds memarea to malloc_perf_autotest.\n\nTest platform: Kunpeng920\nTest command: dpdk-test -a 0000:7d:00.3 -l 10-12\nTest result:\nUSER1: Performance: rte_memarea\nUSER1:    Size (B)   Runs  Alloc (us) Free (us) Total (us)  memset (us)\nUSER1:          64  10000        0.03      0.03       0.06         0.01\nUSER1:         128  10000        0.02      0.03       0.05         0.01\nUSER1:        1024  10000        0.03      0.05       0.07         0.20\nUSER1:        4096  10000        0.03      0.05       0.07         0.34\nUSER1:       65536  10000        0.10      0.08       0.18         2.14\nUSER1:     1048576    644        0.10      0.04       0.14        29.07\nUSER1:     2097152    322        0.10      0.04       0.14        57.50\nUSER1:     4194304    161        0.12      0.04       0.15       114.50\nUSER1:    16777216     40        0.11      0.04       0.15       456.09\nUSER1:  1073741824 Interrupted: out of memory. [1]\n\nCompared with rte_malloc:\nUSER1: Performance: rte_malloc\nUSER1:    Size (B)   Runs  Alloc (us) Free (us) Total (us)  memset (us)\nUSER1:          64  10000        0.14      0.07       0.21         0.01\nUSER1:         128  10000        0.10      0.05       0.15         0.01\nUSER1:        1024  10000        0.11      0.18       0.29         0.21\nUSER1:        4096  10000        0.13      0.39       0.53         0.35\nUSER1:       65536  10000        0.17      2.27       2.44         2.15\nUSER1:     1048576  10000       37.21     71.63     108.84        29.08\nUSER1:     2097152  10000     8831.15    160.02    8991.17        63.52\nUSER1:     4194304  10000    47131.88    413.75   47545.62       173.79\nUSER1:    16777216   4221   119604.60   2209.73  121814.34       964.42\nUSER1:  1073741824     31   335058.32 223369.31  558427.63     62440.87\n\n[1] The total-size of the memarea is restricted to avoid creation\nfailed.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n app/test/test_malloc_perf.c | 55 ++++++++++++++++++++++++++++++++++++-\n 1 file changed, 54 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/app/test/test_malloc_perf.c b/app/test/test_malloc_perf.c\nindex ccec43ae84..a8b4531fe3 100644\n--- a/app/test/test_malloc_perf.c\n+++ b/app/test/test_malloc_perf.c\n@@ -7,10 +7,12 @@\n #include <rte_cycles.h>\n #include <rte_errno.h>\n #include <rte_malloc.h>\n+#include <rte_memarea.h>\n #include <rte_memzone.h>\n \n #include \"test.h\"\n \n+#define PERFTEST_MAX_RUNS\t10000\n #define TEST_LOG(level, ...) RTE_LOG(level, USER1, __VA_ARGS__)\n \n typedef void * (alloc_t)(const char *name, size_t size, unsigned int align);\n@@ -147,10 +149,52 @@ memzone_free(void *addr)\n \trte_memzone_free((struct rte_memzone *)addr);\n }\n \n+static struct rte_memarea *test_ma;\n+\n+static int\n+memarea_pre_env(void)\n+{\n+\tstruct rte_memarea_param init = { 0 };\n+\tsnprintf(init.name, sizeof(init.name), \"perftest\");\n+\tinit.source = RTE_MEMAREA_SOURCE_HEAP;\n+\tinit.alg = RTE_MEMAREA_ALG_NEXTFIT;\n+\tinit.total_sz = PERFTEST_MAX_RUNS * KB * 66; /* test for max 64KB (add 2KB for meta) */\n+\tinit.mt_safe = 1;\n+\tinit.numa_socket = SOCKET_ID_ANY;\n+\tinit.bak_memarea = NULL;\n+\ttest_ma = rte_memarea_create(&init);\n+\tif (test_ma == NULL) {\n+\t\tfprintf(stderr, \"memarea create failed, skip memarea perftest!\\n\");\n+\t\treturn -1;\n+\t}\n+\treturn 0;\n+}\n+\n+static void\n+memarea_clear_env(void)\n+{\n+\trte_memarea_destroy(test_ma);\n+\ttest_ma = NULL;\n+}\n+\n+static void *\n+memarea_alloc(const char *name, size_t size, unsigned int align)\n+{\n+\tRTE_SET_USED(name);\n+\tRTE_SET_USED(align);\n+\treturn rte_memarea_alloc(test_ma, size, 0);\n+}\n+\n+static void\n+memarea_free(void *addr)\n+{\n+\trte_memarea_free(test_ma, addr);\n+}\n+\n static int\n test_malloc_perf(void)\n {\n-\tstatic const size_t MAX_RUNS = 10000;\n+\tstatic const size_t MAX_RUNS = PERFTEST_MAX_RUNS;\n \n \tdouble memset_us_gb = 0;\n \n@@ -168,6 +212,15 @@ test_malloc_perf(void)\n \t\t\tNULL, memset_us_gb, RTE_MAX_MEMZONE - 1) < 0)\n \t\treturn -1;\n \n+\tif (memarea_pre_env() < 0)\n+\t\treturn 0;\n+\tif (test_alloc_perf(\"rte_memarea\", memarea_alloc, memarea_free,\n+\t\t\tmemset, memset_us_gb, MAX_RUNS) < 0) {\n+\t\tmemarea_clear_env();\n+\t\treturn -1;\n+\t}\n+\tmemarea_clear_env();\n+\n \treturn 0;\n }\n \n",
    "prefixes": [
        "v8",
        "9/9"
    ]
}