Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/128264/?format=api
http://patches.dpdk.org/api/patches/128264/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230607035144.1214492-17-zhirun.yan@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": "<20230607035144.1214492-17-zhirun.yan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230607035144.1214492-17-zhirun.yan@intel.com", "date": "2023-06-07T03:51:43", "name": "[v9,16/17] test/graph: add functional tests for mcore dispatch model", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "099ed5123efbd8ec6bacbbe0888a23784bc72d8b", "submitter": { "id": 1154, "url": "http://patches.dpdk.org/api/people/1154/?format=api", "name": "Yan, Zhirun", "email": "zhirun.yan@intel.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/20230607035144.1214492-17-zhirun.yan@intel.com/mbox/", "series": [ { "id": 28383, "url": "http://patches.dpdk.org/api/series/28383/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28383", "date": "2023-06-07T03:51:27", "name": "graph enhancement for multi-core dispatch", "version": 9, "mbox": "http://patches.dpdk.org/series/28383/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/128264/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/128264/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 CAA5842C46;\n\tWed, 7 Jun 2023 06:01:41 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0803642D9E;\n\tWed, 7 Jun 2023 06:00:42 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 1E47941153\n for <dev@dpdk.org>; Wed, 7 Jun 2023 06:00:38 +0200 (CEST)", "from orsmga006.jf.intel.com ([10.7.209.51])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Jun 2023 21:00:38 -0700", "from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.94])\n by orsmga006.jf.intel.com with ESMTP; 06 Jun 2023 21:00:35 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1686110439; x=1717646439;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=/aH3uCFjZrEBviR84ETSn0XhAf1vbBn6Wq86MtM8wd0=;\n b=mMZDAA/p3LTmHg/mtH3UcwCSS9TvwrHhNYa+3mJw6ocGfqtFmIUwiDqV\n MzoFrkWFs3sJS2/vExw9NeCuHXuYOEgi89aF2tdsJdzoLMr5BE2hXhppJ\n OpL7MKxpYJTJJ2RkJsyOPHbWX1k2a6R79sM4kezdvvBDRQ9M91WwRQ5zC\n Pn2V99kCJFsWgkNg+A3D9HSibdZLBLPWdw7reEDf0stusqF2oPSG67zDy\n J4eOyHCD9+WIuSUqunqdsMacQdC1weI+qKm4BCQhj71gMk7GnolPmb0hj\n 2wJNYX4qkeevpsiT6LhuMaJ4PSH481aP9ODcAjmNs8kox6hYpIUxZCXi5 g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10733\"; a=\"359336761\"", "E=Sophos;i=\"6.00,222,1681196400\"; d=\"scan'208\";a=\"359336761\"", "E=McAfee;i=\"6600,9927,10733\"; a=\"686759523\"", "E=Sophos;i=\"6.00,222,1681196400\"; d=\"scan'208\";a=\"686759523\"" ], "X-ExtLoop1": "1", "From": "Zhirun Yan <zhirun.yan@intel.com>", "To": "dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com,\n ndabilpuram@marvell.com, stephen@networkplumber.org,\n pbhagavatula@marvell.com, jerinjacobk@gmail.com", "Cc": "cunming.liang@intel.com, haiyue.wang@intel.com,\n mattias.ronnblom@ericsson.com, Zhirun Yan <zhirun.yan@intel.com>", "Subject": "[PATCH v9 16/17] test/graph: add functional tests for mcore dispatch\n model", "Date": "Wed, 7 Jun 2023 11:51:43 +0800", "Message-Id": "<20230607035144.1214492-17-zhirun.yan@intel.com>", "X-Mailer": "git-send-email 2.37.2", "In-Reply-To": "<20230607035144.1214492-1-zhirun.yan@intel.com>", "References": "<20230606144746.708388-1-zhirun.yan@intel.com>\n <20230607035144.1214492-1-zhirun.yan@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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": "Add functional test for mcore dispatch model including graph clone,\ngraph model set/get, node worker affinity, graph worker binding/unbinding.\n\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\nSigned-off-by: Cunming Liang <cunming.liang@intel.com>\nSigned-off-by: Zhirun Yan <zhirun.yan@intel.com>\n---\n app/test/test_graph.c | 130 ++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 130 insertions(+)", "diff": "diff --git a/app/test/test_graph.c b/app/test/test_graph.c\nindex 1a2d1e6fab..8609c0b3a4 100644\n--- a/app/test/test_graph.c\n+++ b/app/test/test_graph.c\n@@ -660,6 +660,132 @@ test_create_graph(void)\n \treturn 0;\n }\n \n+static int\n+test_graph_clone(void)\n+{\n+\trte_graph_t cloned_graph_id = RTE_GRAPH_ID_INVALID;\n+\trte_graph_t main_graph_id = RTE_GRAPH_ID_INVALID;\n+\tstruct rte_graph_param graph_conf;\n+\tint ret = 0;\n+\n+\tmain_graph_id = rte_graph_from_name(\"worker0\");\n+\tif (main_graph_id == RTE_GRAPH_ID_INVALID) {\n+\t\tprintf(\"Must create main graph first\\n\");\n+\t\tret = -1;\n+\t}\n+\n+\tgraph_conf.dispatch.mp_capacity = 1024;\n+\tgraph_conf.dispatch.wq_size_max = 32;\n+\n+\tcloned_graph_id = rte_graph_clone(main_graph_id, \"cloned-test0\", &graph_conf);\n+\n+\tif (cloned_graph_id == RTE_GRAPH_ID_INVALID) {\n+\t\tprintf(\"Graph creation failed with error = %d\\n\", rte_errno);\n+\t\tret = -1;\n+\t}\n+\n+\tif (strcmp(rte_graph_id_to_name(cloned_graph_id), \"worker0-cloned-test0\")) {\n+\t\tprintf(\"Cloned graph should name as %s but get %s\\n\", \"worker0-cloned-test\",\n+\t\t rte_graph_id_to_name(cloned_graph_id));\n+\t\tret = -1;\n+\t}\n+\n+\trte_graph_destroy(cloned_graph_id);\n+\n+\treturn ret;\n+}\n+\n+static int\n+test_graph_model_mcore_dispatch_node_lcore_affinity_set(void)\n+{\n+\trte_graph_t cloned_graph_id = RTE_GRAPH_ID_INVALID;\n+\tunsigned int worker_lcore = RTE_MAX_LCORE;\n+\trte_node_t nid = RTE_NODE_ID_INVALID;\n+\tchar node_name[64] = \"test_node00\";\n+\tstruct rte_node *node;\n+\tint ret = 0;\n+\n+\tworker_lcore = rte_get_next_lcore(worker_lcore, true, 1);\n+\tret = rte_graph_model_mcore_dispatch_node_lcore_affinity_set(node_name, worker_lcore);\n+\tif (ret == 0)\n+\t\tprintf(\"Set node %s affinity to lcore %u\\n\", node_name, worker_lcore);\n+\n+\tnid = rte_node_from_name(node_name);\n+\tcloned_graph_id = rte_graph_clone(graph_id, \"cloned-test1\", NULL);\n+\tnode = rte_graph_node_get(cloned_graph_id, nid);\n+\n+\tif (node->dispatch.lcore_id != worker_lcore) {\n+\t\tprintf(\"set node affinity failed\\n\");\n+\t\tret = -1;\n+\t}\n+\n+\trte_graph_destroy(cloned_graph_id);\n+\n+\treturn ret;\n+}\n+\n+static int\n+test_graph_model_mcore_dispatch_core_bind_unbind(void)\n+{\n+\trte_graph_t cloned_graph_id = RTE_GRAPH_ID_INVALID;\n+\tunsigned int worker_lcore = RTE_MAX_LCORE;\n+\tstruct rte_graph *graph;\n+\tint ret = 0;\n+\n+\tworker_lcore = rte_get_next_lcore(worker_lcore, true, 1);\n+\tcloned_graph_id = rte_graph_clone(graph_id, \"cloned-test2\", NULL);\n+\n+\tret = rte_graph_model_mcore_dispatch_core_bind(cloned_graph_id, worker_lcore);\n+\tif (ret != 0) {\n+\t\tprintf(\"bind graph %d to lcore %u failed\\n\", graph_id, worker_lcore);\n+\t\tret = -1;\n+\t}\n+\n+\tgraph = rte_graph_lookup(\"worker0-cloned-test2\");\n+\n+\tif (graph->dispatch.lcore_id != worker_lcore) {\n+\t\tprintf(\"bind graph %s(id:%d) with lcore %u failed\\n\",\n+\t\t graph->name, graph->id, worker_lcore);\n+\t\tret = -1;\n+\t}\n+\n+\trte_graph_model_mcore_dispatch_core_unbind(cloned_graph_id);\n+\tif (graph->dispatch.lcore_id != RTE_MAX_LCORE) {\n+\t\tprintf(\"unbind graph %s(id:%d) failed %d\\n\",\n+\t\t graph->name, graph->id, graph->dispatch.lcore_id);\n+\t\tret = -1;\n+\t}\n+\n+\trte_graph_destroy(cloned_graph_id);\n+\n+\treturn ret;\n+}\n+\n+static int\n+test_graph_worker_model_set_get(void)\n+{\n+\trte_graph_t cloned_graph_id = RTE_GRAPH_ID_INVALID;\n+\tstruct rte_graph *graph;\n+\tint ret = 0;\n+\n+\tcloned_graph_id = rte_graph_clone(graph_id, \"cloned-test3\", NULL);\n+\tret = rte_graph_worker_model_set(RTE_GRAPH_MODEL_MCORE_DISPATCH);\n+\tif (ret != 0) {\n+\t\tprintf(\"Set graph mcore dispatch model failed\\n\");\n+\t\tret = -1;\n+\t}\n+\n+\tgraph = rte_graph_lookup(\"worker0-cloned-test3\");\n+\tif (rte_graph_worker_model_get(graph) != RTE_GRAPH_MODEL_MCORE_DISPATCH) {\n+\t\tprintf(\"Get graph worker model failed\\n\");\n+\t\tret = -1;\n+\t}\n+\n+\trte_graph_destroy(cloned_graph_id);\n+\n+\treturn 0;\n+}\n+\n static int\n test_graph_walk(void)\n {\n@@ -837,6 +963,10 @@ static struct unit_test_suite graph_testsuite = {\n \t\tTEST_CASE(test_update_edges),\n \t\tTEST_CASE(test_lookup_functions),\n \t\tTEST_CASE(test_create_graph),\n+\t\tTEST_CASE(test_graph_clone),\n+\t\tTEST_CASE(test_graph_model_mcore_dispatch_node_lcore_affinity_set),\n+\t\tTEST_CASE(test_graph_model_mcore_dispatch_core_bind_unbind),\n+\t\tTEST_CASE(test_graph_worker_model_set_get),\n \t\tTEST_CASE(test_graph_lookup_functions),\n \t\tTEST_CASE(test_graph_walk),\n \t\tTEST_CASE(test_print_stats),\n", "prefixes": [ "v9", "16/17" ] }{ "id": 128264, "url": "