Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/73419/?format=api
https://patches.dpdk.org/api/patches/73419/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1594118726-8421-2-git-send-email-arybchenko@solarflare.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": "<1594118726-8421-2-git-send-email-arybchenko@solarflare.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1594118726-8421-2-git-send-email-arybchenko@solarflare.com", "date": "2020-07-07T10:45:25", "name": "[v3,2/2] test/service: add test for service active on two lcores", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "ba20defa0c1165586380eaf3c0183420a745cebf", "submitter": { "id": 607, "url": "https://patches.dpdk.org/api/people/607/?format=api", "name": "Andrew Rybchenko", "email": "arybchenko@solarflare.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/1594118726-8421-2-git-send-email-arybchenko@solarflare.com/mbox/", "series": [ { "id": 10789, "url": "https://patches.dpdk.org/api/series/10789/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10789", "date": "2020-07-04T14:35:47", "name": "service: fix wrong lcore indexes", "version": 1, "mbox": "https://patches.dpdk.org/series/10789/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/73419/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/73419/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 28BEAA00BE;\n\tTue, 7 Jul 2020 12:45:36 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AE12A1DDD6;\n\tTue, 7 Jul 2020 12:45:34 +0200 (CEST)", "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 174011DDD5\n for <dev@dpdk.org>; Tue, 7 Jul 2020 12:45:33 +0200 (CEST)", "from mx1-us1.ppe-hosted.com (unknown [10.110.50.150])\n by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id\n 85A0220087; Tue, 7 Jul 2020 10:45:32 +0000 (UTC)", "from us4-mdac16-44.at1.mdlocal (unknown [10.110.48.15])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 83983800A3;\n Tue, 7 Jul 2020 10:45:32 +0000 (UTC)", "from mx1-us1.ppe-hosted.com (unknown [10.110.49.106])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n 17BE3100052;\n Tue, 7 Jul 2020 10:45:32 +0000 (UTC)", "from webmail.solarflare.com (uk.solarflare.com [193.34.186.16])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n (No client certificate requested)\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n D414EB40066;\n Tue, 7 Jul 2020 10:45:31 +0000 (UTC)", "from ukex01.SolarFlarecom.com (10.17.10.4) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id\n 15.0.1497.2; Tue, 7 Jul 2020 11:45:28 +0100", "from opal.uk.solarflarecom.com (10.17.10.1) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id\n 15.0.1497.2 via Frontend Transport; Tue, 7 Jul 2020 11:45:28 +0100", "from ukv-loginhost.uk.solarflarecom.com\n (ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 067AjSaH013633;\n Tue, 7 Jul 2020 11:45:28 +0100", "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 67A7D1626E9;\n Tue, 7 Jul 2020 11:45:28 +0100 (BST)" ], "X-Virus-Scanned": "Proofpoint Essentials engine", "From": "Andrew Rybchenko <arybchenko@solarflare.com>", "To": "<dev@dpdk.org>", "CC": "Igor Romanov <igor.romanov@oktetlabs.ru>, Harry van Haaren\n <harry.van.haaren@intel.com>", "Date": "Tue, 7 Jul 2020 11:45:25 +0100", "Message-ID": "<1594118726-8421-2-git-send-email-arybchenko@solarflare.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1594118726-8421-1-git-send-email-arybchenko@solarflare.com>", "References": "<1593873347-13686-1-git-send-email-arybchenko@solarflare.com>\n <1594118726-8421-1-git-send-email-arybchenko@solarflare.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.6.1012-25526.003", "X-TM-AS-Result": "No-7.886200-8.000000-10", "X-TMASE-MatchedRID": "sgT35vMqibO09I1RF1swcOIfK/Jd5eHmjotcmj+7SkE4XREg9Ki10xd2\n WyReW5ebcKLnwjXEZ1ayUescqeUMprYX2Zbb0Huy6fUfELqFUH9KRaXN2yYjHjsUTbqaO707QBz\n oPKhLasjFG6rPbKnpuvD8CGDYfAZ9FUPnz5fE4uPylEfNwb6iLVF5adRR2Ej1kaEC8FJraL/cru\n +PSMhej/bCvJzBrCnffuf8ioYS+7Gg2YoJMKNlEYNraaMEw/Vakos2tunL8DQrC/kbp8twD9IQa\n SugOFswNWlqv3euRjUYGmTiWQlQQpilmT/yOYwxlchF+IvkllOi8D/o42y/Sj1KWk8zZw5Fo8WM\n kQWv6iXBcIE78YqRWo6HM5rqDwqtHDoAauuBleM+fM8D35G8fb0MhOynrKQ48uLQ3wCtP7NiH+Z\n jIy/leEMMprcbiest", "X-TM-AS-User-Approved-Sender": "Yes", "X-TM-AS-User-Blocked-Sender": "No", "X-TMASE-Result": "10--7.886200-8.000000", "X-TMASE-Version": "SMEX-12.5.0.1300-8.6.1012-25526.003", "X-MDID": "1594118732-xZXEK_HXckZ4", "Subject": "[dpdk-dev] [PATCH v3 2/2] test/service: add test for service active\n\ton two lcores", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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": "From: Igor Romanov <igor.romanov@oktetlabs.ru>\n\nThe test checks that the service may be active API works\nwhen there are two cores: a non-service lcore and a service one.\n\nThe API notes to take care when checking the status of a running\nservice, but the test setup allows for a safe usage in that case.\n\nSigned-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\nv3:\n - skip the test if number of cores is insufficient\n\n app/test/test_service_cores.c | 54 +++++++++++++++++++++++++++++++++++\n 1 file changed, 54 insertions(+)", "diff": "diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c\nindex 981e212130..4f003ed1af 100644\n--- a/app/test/test_service_cores.c\n+++ b/app/test/test_service_cores.c\n@@ -910,6 +910,59 @@ service_may_be_active(void)\n \treturn unregister_all();\n }\n \n+/* check service may be active when service is running on a second lcore */\n+static int\n+service_active_two_cores(void)\n+{\n+\tif (!rte_lcore_is_enabled(0) || !rte_lcore_is_enabled(1) ||\n+\t !rte_lcore_is_enabled(2))\n+\t\treturn TEST_SKIPPED;\n+\n+\tconst uint32_t sid = 0;\n+\tint i;\n+\n+\tuint32_t lcore = rte_get_next_lcore(/* start core */ -1,\n+\t\t\t\t\t /* skip master */ 1,\n+\t\t\t\t\t /* wrap */ 0);\n+\tuint32_t slcore = rte_get_next_lcore(/* start core */ lcore,\n+\t\t\t\t\t /* skip master */ 1,\n+\t\t\t\t\t /* wrap */ 0);\n+\n+\t/* start the service on the second available lcore */\n+\tTEST_ASSERT_EQUAL(0, rte_service_runstate_set(sid, 1),\n+\t\t\t\"Starting valid service failed\");\n+\tTEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore),\n+\t\t\t\"Add service core failed when not in use before\");\n+\tTEST_ASSERT_EQUAL(0, rte_service_map_lcore_set(sid, slcore, 1),\n+\t\t\t\"Enabling valid service on valid core failed\");\n+\tTEST_ASSERT_EQUAL(0, rte_service_lcore_start(slcore),\n+\t\t\t\"Service core start after add failed\");\n+\n+\t/* ensures core really is running the service function */\n+\tTEST_ASSERT_EQUAL(1, service_lcore_running_check(),\n+\t\t\t\"Service core expected to poll service but it didn't\");\n+\n+\t/* ensures that service may be active reports running state */\n+\tTEST_ASSERT_EQUAL(1, rte_service_may_be_active(sid),\n+\t\t\t\"Service may be active did not report running state\");\n+\n+\t/* stop the service */\n+\tTEST_ASSERT_EQUAL(0, rte_service_runstate_set(sid, 0),\n+\t\t\t\"Error: Service stop returned non-zero\");\n+\n+\t/* give the service 100ms to stop running */\n+\tfor (i = 0; i < 100; i++) {\n+\t\tif (!rte_service_may_be_active(sid))\n+\t\t\tbreak;\n+\t\trte_delay_ms(SERVICE_DELAY);\n+\t}\n+\n+\tTEST_ASSERT_EQUAL(0, rte_service_may_be_active(sid),\n+\t\t\t \"Error: Service not stopped after 100ms\");\n+\n+\treturn unregister_all();\n+}\n+\n static struct unit_test_suite service_tests = {\n \t.suite_name = \"service core test suite\",\n \t.setup = testsuite_setup,\n@@ -931,6 +984,7 @@ static struct unit_test_suite service_tests = {\n \t\tTEST_CASE_ST(dummy_register, NULL, service_app_lcore_mt_safe),\n \t\tTEST_CASE_ST(dummy_register, NULL, service_app_lcore_mt_unsafe),\n \t\tTEST_CASE_ST(dummy_register, NULL, service_may_be_active),\n+\t\tTEST_CASE_ST(dummy_register, NULL, service_active_two_cores),\n \t\tTEST_CASES_END() /**< NULL terminate unit test array */\n \t}\n };\n", "prefixes": [ "v3", "2/2" ] }{ "id": 73419, "url": "