Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/101512/?format=api
http://patchwork.dpdk.org/api/patches/101512/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20211013201811.15247-2-honnappa.nagarahalli@arm.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": "<20211013201811.15247-2-honnappa.nagarahalli@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211013201811.15247-2-honnappa.nagarahalli@arm.com", "date": "2021-10-13T20:18:11", "name": "[v4,2/2] test/eal: add a test for rte_ctrl_thread_create", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "65805e4683b0b78c14b24f6b2fef0848704f3598", "submitter": { "id": 1045, "url": "http://patchwork.dpdk.org/api/people/1045/?format=api", "name": "Honnappa Nagarahalli", "email": "honnappa.nagarahalli@arm.com" }, "delegate": { "id": 24651, "url": "http://patchwork.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20211013201811.15247-2-honnappa.nagarahalli@arm.com/mbox/", "series": [ { "id": 19619, "url": "http://patchwork.dpdk.org/api/series/19619/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=19619", "date": "2021-10-13T20:18:10", "name": "[v4,1/2] eal: simplify the implementation of rte_ctrl_thread_create", "version": 4, "mbox": "http://patchwork.dpdk.org/series/19619/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/101512/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/101512/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 203ABA0C55;\n\tWed, 13 Oct 2021 22:18:27 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D82DC41211;\n\tWed, 13 Oct 2021 22:18:25 +0200 (CEST)", "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id AE595410FA\n for <dev@dpdk.org>; Wed, 13 Oct 2021 22:18:22 +0200 (CEST)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1449011D4;\n Wed, 13 Oct 2021 13:18:22 -0700 (PDT)", "from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com\n [10.118.12.44])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0AA843F70D;\n Wed, 13 Oct 2021 13:18:22 -0700 (PDT)" ], "From": "Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>", "To": "dev@dpdk.org, honnappa.nagarahalli@arm.com, olivier.matz@6wind.com,\n lucp.at.work@gmail.com, stephen@networkplumber.org,\n david.marchand@redhat.com, thomas@monjalon.net", "Cc": "ruifeng.wang@arm.com,\n\tnd@arm.com", "Date": "Wed, 13 Oct 2021 15:18:11 -0500", "Message-Id": "<20211013201811.15247-2-honnappa.nagarahalli@arm.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20211013201811.15247-1-honnappa.nagarahalli@arm.com>", "References": "<20210730213709.19400-1-honnappa.nagarahalli@arm.com>\n <20211013201811.15247-1-honnappa.nagarahalli@arm.com>", "Subject": "[dpdk-dev] [PATCH v4 2/2] test/eal: add a test for\n rte_ctrl_thread_create", "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": "Add a testcase to test launching of control threads.\n\nSigned-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\n---\n app/test/test_lcores.c | 41 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 41 insertions(+)", "diff": "diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c\nindex 19a7ab9fce..35c47d5372 100644\n--- a/app/test/test_lcores.c\n+++ b/app/test/test_lcores.c\n@@ -340,6 +340,44 @@ test_non_eal_lcores_callback(unsigned int eal_threads_count)\n \treturn -1;\n }\n \n+static void *ctrl_thread_loop(void *arg)\n+{\n+\tstruct thread_context *t = arg;\n+\n+\tprintf(\"Control thread running successfully\\n\");\n+\n+\t/* Set the thread state to DONE */\n+\tt->state = DONE;\n+\n+\treturn NULL;\n+}\n+\n+static int\n+test_ctrl_thread(void)\n+{\n+\tstruct thread_context ctrl_thread_context;\n+\tstruct thread_context *t;\n+\n+\t/* Create one control thread */\n+\tt = &ctrl_thread_context;\n+\tt->state = INIT;\n+\tif (rte_ctrl_thread_create(&t->id, \"test_ctrl_threads\",\n+\t\t\t\t\tNULL, ctrl_thread_loop, t) != 0)\n+\t\treturn -1;\n+\n+\t/* Wait till the control thread exits.\n+\t * This also acts as the barrier such that the memory operations\n+\t * in control thread are visible to this thread.\n+\t */\n+\tpthread_join(t->id, NULL);\n+\n+\t/* Check if the control thread set the correct state */\n+\tif (t->state != DONE)\n+\t\treturn -1;\n+\n+\treturn 0;\n+}\n+\n static int\n test_lcores(void)\n {\n@@ -367,6 +405,9 @@ test_lcores(void)\n \tif (test_non_eal_lcores_callback(eal_threads_count) < 0)\n \t\treturn TEST_FAILED;\n \n+\tif (test_ctrl_thread() < 0)\n+\t\treturn TEST_FAILED;\n+\n \treturn TEST_SUCCESS;\n }\n \n", "prefixes": [ "v4", "2/2" ] }{ "id": 101512, "url": "