Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/116523/?format=api
http://patches.dpdk.org/api/patches/116523/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220921031256.4954-9-fengchengwen@huawei.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": "<20220921031256.4954-9-fengchengwen@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220921031256.4954-9-fengchengwen@huawei.com", "date": "2022-09-21T03:12:55", "name": "[v2,8/9] test/memarea: support backup memory test", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3225f3e7b57b657a968f7519f54815f99d6fc95a", "submitter": { "id": 2146, "url": "http://patches.dpdk.org/api/people/2146/?format=api", "name": "fengchengwen", "email": "fengchengwen@huawei.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/20220921031256.4954-9-fengchengwen@huawei.com/mbox/", "series": [ { "id": 24741, "url": "http://patches.dpdk.org/api/series/24741/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24741", "date": "2022-09-21T03:12:47", "name": "introduce memarea library", "version": 2, "mbox": "http://patches.dpdk.org/series/24741/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/116523/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/116523/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 4093FA034C;\n\tWed, 21 Sep 2022 05:19:38 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 43C1F42905;\n\tWed, 21 Sep 2022 05:19:18 +0200 (CEST)", "from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189])\n by mails.dpdk.org (Postfix) with ESMTP id D220C410E8\n for <dev@dpdk.org>; Wed, 21 Sep 2022 05:19:13 +0200 (CEST)", "from dggpeml500024.china.huawei.com (unknown [172.30.72.54])\n by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MXNqx4hwGzHpft;\n Wed, 21 Sep 2022 11:17:01 +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; Wed, 21 Sep 2022 11:19:10 +0800" ], "From": "Chengwen Feng <fengchengwen@huawei.com>", "To": "<thomas@monjalon.net>", "CC": "<dev@dpdk.org>, <stephen@networkplumber.org>, <jerinjacobk@gmail.com>,\n <dmitry.kozliuk@gmail.com>", "Subject": "[PATCH v2 8/9] test/memarea: support backup memory test", "Date": "Wed, 21 Sep 2022 03:12:55 +0000", "Message-ID": "<20220921031256.4954-9-fengchengwen@huawei.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20220921031256.4954-1-fengchengwen@huawei.com>", "References": "<20220721044648.6817-1-fengchengwen@huawei.com>\n <20220921031256.4954-1-fengchengwen@huawei.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.67.165.24]", "X-ClientProxiedBy": "dggems704-chm.china.huawei.com (10.3.19.181) 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 supports backup memory mechanism test.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n app/test/test_memarea.c | 41 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 41 insertions(+)", "diff": "diff --git a/app/test/test_memarea.c b/app/test/test_memarea.c\nindex a07fb4424f..9609909d7c 100644\n--- a/app/test/test_memarea.c\n+++ b/app/test/test_memarea.c\n@@ -291,6 +291,46 @@ test_memarea_dump(void)\n \treturn 0;\n }\n \n+static int\n+test_memarea_backup(void)\n+{\n+\tstruct rte_memarea *ma, *bak_ma;\n+\tstruct rte_memarea_param init;\n+\tvoid *ptr;\n+\n+\t/* prepare env */\n+\ttest_memarea_init_def_param(&init);\n+\tstrcat(init.name, \"_backup\");\n+\tinit.source = RTE_MEMAREA_SOURCE_SYSTEM_API;\n+\tinit.total_sz = MEMAREA_TEST_DEFAULT_SIZE;\n+\tbak_ma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(bak_ma != NULL, \"Expected Non-NULL\");\n+\ttest_memarea_init_def_param(&init);\n+\tinit.source = RTE_MEMAREA_SOURCE_SYSTEM_API;\n+\tinit.total_sz = MEMAREA_TEST_DEFAULT_SIZE >> 2;\n+\tinit.bak_memarea = bak_ma;\n+\tma = rte_memarea_create(&init);\n+\tRTE_TEST_ASSERT(ma != NULL, \"Expected Non-NULL\");\n+\n+\t/* test for backup */\n+\tptr = rte_memarea_alloc(ma, MEMAREA_TEST_DEFAULT_SIZE >> 3, 0);\n+\tRTE_TEST_ASSERT(ptr != NULL, \"Expected Non-NULL\");\n+\tptr = rte_memarea_alloc(ma, MEMAREA_TEST_DEFAULT_SIZE >> 1, 0);\n+\tRTE_TEST_ASSERT(ptr != NULL, \"Expected Non-NULL\");\n+\t(void)rte_memarea_dump(ma, stderr, true);\n+\t(void)rte_memarea_dump(bak_ma, stderr, true);\n+\trte_memarea_free(ma, ptr);\n+\tptr = rte_memarea_alloc(ma, MEMAREA_TEST_DEFAULT_SIZE, 0);\n+\tRTE_TEST_ASSERT(ptr == NULL, \"Expected NULL\");\n+\t(void)rte_memarea_dump(ma, stderr, true);\n+\t(void)rte_memarea_dump(bak_ma, stderr, true);\n+\n+\trte_memarea_destroy(ma);\n+\trte_memarea_destroy(bak_ma);\n+\n+\treturn 0;\n+}\n+\n static int\n test_memarea(void)\n {\n@@ -300,6 +340,7 @@ test_memarea(void)\n \tMEMAREA_TEST_API_RUN(test_memarea_free_fail);\n \tMEMAREA_TEST_API_RUN(test_memarea_alloc_free);\n \tMEMAREA_TEST_API_RUN(test_memarea_dump);\n+\tMEMAREA_TEST_API_RUN(test_memarea_backup);\n \treturn 0;\n }\n \n", "prefixes": [ "v2", "8/9" ] }{ "id": 116523, "url": "