Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/44622/?format=api
http://patches.dpdk.org/api/patches/44622/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180912161616.42306-3-harry.van.haaren@intel.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": "<20180912161616.42306-3-harry.van.haaren@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180912161616.42306-3-harry.van.haaren@intel.com", "date": "2018-09-12T16:16:16", "name": "[3/3] event/sw: add unit test for unlinks in progress", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "04e860db2b464949ebefe275617c07df27661aa6", "submitter": { "id": 317, "url": "http://patches.dpdk.org/api/people/317/?format=api", "name": "Van Haaren, Harry", "email": "harry.van.haaren@intel.com" }, "delegate": { "id": 310, "url": "http://patches.dpdk.org/api/users/310/?format=api", "username": "jerin", "first_name": "Jerin", "last_name": "Jacob", "email": "jerinj@marvell.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180912161616.42306-3-harry.van.haaren@intel.com/mbox/", "series": [ { "id": 1296, "url": "http://patches.dpdk.org/api/series/1296/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1296", "date": "2018-09-12T16:16:14", "name": "[1/3] event: add function for reading unlink in progress", "version": 1, "mbox": "http://patches.dpdk.org/series/1296/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/44622/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/44622/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DABE55592;\n\tWed, 12 Sep 2018 18:16:31 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id E01945398\n\tfor <dev@dpdk.org>; Wed, 12 Sep 2018 18:16:30 +0200 (CEST)", "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t12 Sep 2018 09:16:30 -0700", "from silpixa00399779.ir.intel.com (HELO\n\tsilpixa00399779.ger.corp.intel.com) ([10.237.223.187])\n\tby orsmga006.jf.intel.com with ESMTP; 12 Sep 2018 09:16:29 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.53,365,1531810800\"; d=\"scan'208\";a=\"73717382\"", "From": "Harry van Haaren <harry.van.haaren@intel.com>", "To": "dev@dpdk.org", "Cc": "jerin.jacob@caviumnetworks.com, matias.elo@nokia.com,\n\tHarry van Haaren <harry.van.haaren@intel.com>", "Date": "Wed, 12 Sep 2018 17:16:16 +0100", "Message-Id": "<20180912161616.42306-3-harry.van.haaren@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20180912161616.42306-1-harry.van.haaren@intel.com>", "References": "<20180912161616.42306-1-harry.van.haaren@intel.com>", "Subject": "[dpdk-dev] [PATCH 3/3] event/sw: add unit test for unlinks in\n\tprogress", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This commit adds a unit test that checks the behaviour\nof the unlinks_in_progress() function, ensuring that the\nreturned values are the number of unlinks requested,\nuntil the scheduler runs and \"acks\" the requests, after\nwhich the count should be zero again.\n\nSigned-off-by: Harry van Haaren <harry.van.haaren@intel.com>\n---\n drivers/event/sw/sw_evdev_selftest.c | 76 ++++++++++++++++++++++++++++\n 1 file changed, 76 insertions(+)", "diff": "diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c\nindex c40912db5..374abef7c 100644\n--- a/drivers/event/sw/sw_evdev_selftest.c\n+++ b/drivers/event/sw/sw_evdev_selftest.c\n@@ -1903,6 +1903,77 @@ qid_priorities(struct test *t)\n \treturn 0;\n }\n \n+static int\n+unlink_in_progress(struct test *t)\n+{\n+\t/* Test unlinking API, in particular that when an unlink request has\n+\t * not yet been seen by the scheduler thread, that the\n+\t * unlink_in_progress() function returns the number of unlinks.\n+\t */\n+\tunsigned int i;\n+\t/* Create instance with 1 ports, and 3 qids */\n+\tif (init(t, 3, 1) < 0 ||\n+\t\t\tcreate_ports(t, 1) < 0) {\n+\t\tprintf(\"%d: Error initializing device\\n\", __LINE__);\n+\t\treturn -1;\n+\t}\n+\n+\tfor (i = 0; i < 3; i++) {\n+\t\t/* Create QID */\n+\t\tconst struct rte_event_queue_conf conf = {\n+\t\t\t.schedule_type = RTE_SCHED_TYPE_ATOMIC,\n+\t\t\t/* increase priority (0 == highest), as we go */\n+\t\t\t.priority = RTE_EVENT_DEV_PRIORITY_NORMAL - i,\n+\t\t\t.nb_atomic_flows = 1024,\n+\t\t\t.nb_atomic_order_sequences = 1024,\n+\t\t};\n+\n+\t\tif (rte_event_queue_setup(evdev, i, &conf) < 0) {\n+\t\t\tprintf(\"%d: error creating qid %d\\n\", __LINE__, i);\n+\t\t\treturn -1;\n+\t\t}\n+\t\tt->qid[i] = i;\n+\t}\n+\tt->nb_qids = i;\n+\t/* map all QIDs to port */\n+\trte_event_port_link(evdev, t->port[0], NULL, NULL, 0);\n+\n+\tif (rte_event_dev_start(evdev) < 0) {\n+\t\tprintf(\"%d: Error with start call\\n\", __LINE__);\n+\t\treturn -1;\n+\t}\n+\n+\t/* unlink all ports to have outstanding unlink requests */\n+\tint ret = rte_event_port_unlink(evdev, t->port[0], NULL, 0);\n+\tif (ret < 0) {\n+\t\tprintf(\"%d: Failed to unlink queues\\n\", __LINE__);\n+\t\treturn -1;\n+\t}\n+\n+\t/* get active unlinks here, expect 3 */\n+\tint unlinks_in_progress =\n+\t\trte_event_port_unlinks_in_progress(evdev, t->port[0]);\n+\tif (unlinks_in_progress != 3) {\n+\t\tprintf(\"%d: Expected num unlinks in progress == 3, got %d\\n\",\n+\t\t\t\t__LINE__, unlinks_in_progress);\n+\t\treturn -1;\n+\t}\n+\n+\t/* run scheduler service on this thread to ack the unlinks */\n+\trte_service_run_iter_on_app_lcore(t->service_id, 1);\n+\n+\t/* active unlinks expected as 0 as scheduler thread has acked */\n+\tunlinks_in_progress =\n+\t\trte_event_port_unlinks_in_progress(evdev, t->port[0]);\n+\tif (unlinks_in_progress != 0) {\n+\t\tprintf(\"%d: Expected num unlinks in progress == 0, got %d\\n\",\n+\t\t\t\t__LINE__, unlinks_in_progress);\n+\t}\n+\n+\tcleanup(t);\n+\treturn 0;\n+}\n+\n static int\n load_balancing(struct test *t)\n {\n@@ -3260,6 +3331,11 @@ test_sw_eventdev(void)\n \t\tprintf(\"ERROR - QID Priority test FAILED.\\n\");\n \t\tgoto test_fail;\n \t}\n+\tret = unlink_in_progress(t);\n+\tif (ret != 0) {\n+\t\tprintf(\"ERROR - Unlink in progress test FAILED.\\n\");\n+\t\tgoto test_fail;\n+\t}\n \tprintf(\"*** Running Ordered Reconfigure test...\\n\");\n \tret = ordered_reconfigure(t);\n \tif (ret != 0) {\n", "prefixes": [ "3/3" ] }{ "id": 44622, "url": "