Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/128496/?format=api
http://patches.dpdk.org/api/patches/128496/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230609191245.252521-16-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": "<20230609191245.252521-16-zhirun.yan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230609191245.252521-16-zhirun.yan@intel.com", "date": "2023-06-09T19:12:44", "name": "[v12,15/16] test/graph: add functional tests for mcore dispatch model", "commit_ref": null, "pull_url": null, "state": "superseded", "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/20230609191245.252521-16-zhirun.yan@intel.com/mbox/", "series": [ { "id": 28444, "url": "http://patches.dpdk.org/api/series/28444/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28444", "date": "2023-06-09T19:12:29", "name": "graph enhancement for multi-core dispatch", "version": 12, "mbox": "http://patches.dpdk.org/series/28444/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/128496/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/128496/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 0C68242C71;\n\tFri, 9 Jun 2023 21:21:45 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D15F842D8A;\n\tFri, 9 Jun 2023 21:20:34 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 2FF1E42D8A\n for <dev@dpdk.org>; Fri, 9 Jun 2023 21:20:33 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Jun 2023 12:20:32 -0700", "from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.94])\n by fmsmga006.fm.intel.com with ESMTP; 09 Jun 2023 12:20:29 -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=1686338433; x=1717874433;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=GCHvh/8xaurPU393+p5XZALfiUafmxZqkcyAQ1hhiUI=;\n b=i885KolKpxRmt54MbYbl9PqpIaCxtQvQUNVl2kLP4s+G3pn1yyX/a6LN\n A7mb3lM6kuY10ZX1uwF2owlHciSQ+PA4ySXH5OM8Oi+m3h4uMn9WJqz0H\n CTRq1SCi3u9Srjh08JDjXeGcPIHw3UA49oXbP25PwTGOUf50mqPPW0eIZ\n l2+T1BIxXyKHVtQg3QT3D8wKZ5Axsp1bE4hZshRylfkAxo39HPnBnwi0d\n yL6IiOXzsQN1eOtFJ3U69GTJsfvHLdp3XagT6BljbHPuUZCVmufGYkgtY\n tueAuj92fGJPic75J7pRYu/sp3xDVyNfKDMfO/ZfDD8lu75dv8XuoCcqd w==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10736\"; a=\"360155182\"", "E=Sophos;i=\"6.00,230,1681196400\"; d=\"scan'208\";a=\"360155182\"", "E=McAfee;i=\"6600,9927,10736\"; a=\"957254705\"", "E=Sophos;i=\"6.00,230,1681196400\"; d=\"scan'208\";a=\"957254705\"" ], "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, david.marchand@redhat.com", "Cc": "cunming.liang@intel.com, haiyue.wang@intel.com,\n mattias.ronnblom@ericsson.com, Zhirun Yan <zhirun.yan@intel.com>", "Subject": "[PATCH v12 15/16] test/graph: add functional tests for mcore dispatch\n model", "Date": "Sat, 10 Jun 2023 03:12:44 +0800", "Message-Id": "<20230609191245.252521-16-zhirun.yan@intel.com>", "X-Mailer": "git-send-email 2.37.2", "In-Reply-To": "<20230609191245.252521-1-zhirun.yan@intel.com>", "References": "<20230608151844.1823783-1-zhirun.yan@intel.com>\n <20230609191245.252521-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>\nAcked-by: Pavan Nikhilesh <pbhagavatula@marvell.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": [ "v12", "15/16" ] }{ "id": 128496, "url": "