Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/128137/?format=api
http://patchwork.dpdk.org/api/patches/128137/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230605111923.3772260-17-zhirun.yan@intel.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": "<20230605111923.3772260-17-zhirun.yan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230605111923.3772260-17-zhirun.yan@intel.com", "date": "2023-06-05T11:19:22", "name": "[v7,16/17] test/graph: add functional tests for mcore dispatch model", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "fa9206234415f37255610a68711a7f424ebcb6ff", "submitter": { "id": 1154, "url": "http://patchwork.dpdk.org/api/people/1154/?format=api", "name": "Yan, Zhirun", "email": "zhirun.yan@intel.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230605111923.3772260-17-zhirun.yan@intel.com/mbox/", "series": [ { "id": 28355, "url": "http://patchwork.dpdk.org/api/series/28355/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28355", "date": "2023-06-05T11:19:06", "name": "graph enhancement for multi-core dispatch", "version": 7, "mbox": "http://patchwork.dpdk.org/series/28355/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/128137/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/128137/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 44AB542BCF;\n\tMon, 5 Jun 2023 13:28:06 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 372EF42D3E;\n\tMon, 5 Jun 2023 13:27:08 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 1D19A42DBA\n for <dev@dpdk.org>; Mon, 5 Jun 2023 13:27:05 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 05 Jun 2023 04:27:05 -0700", "from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.94])\n by orsmga004.jf.intel.com with ESMTP; 05 Jun 2023 04:27:02 -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=1685964426; x=1717500426;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=2feDbESPZg/LmMcaAMrdEs1xzOtshMANT0zJsErXdHs=;\n b=PjdjlTfAv3nuTjeKm9ZF1MQ06g53ifFyQSmQLT1ApxraR/nPPv1SAQZ9\n 8u6dhCLP2VcFKiDj8k5kBGNIyJyOp9sJ3kOy4pcKoShsUk4PXfv7gFnSY\n +KoUdRMuZcvUjomxF4QWtbpKVR8mbLPpkSbh4uHPyU2TKMyLM0x5teetz\n Jxua57HyGxfkkxnWkEFprNtKiUtEnLDqL9iAqVP7Z8tDSFse5XlrdrQTA\n CcoBvyruGWplwuaZ/FD2B33PHCcoVymPxuLK4pUbOz8XdX6U9Vh/KmFFX\n UP5AqQdSWazNJ0M883yyMtxrk6q530wVP8xAO5+PwBTKR/01JrQsvga0c g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10731\"; a=\"422168677\"", "E=Sophos;i=\"6.00,217,1681196400\"; d=\"scan'208\";a=\"422168677\"", "E=McAfee;i=\"6600,9927,10731\"; a=\"832779001\"", "E=Sophos;i=\"6.00,217,1681196400\"; d=\"scan'208\";a=\"832779001\"" ], "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 v7 16/17] test/graph: add functional tests for mcore dispatch\n model", "Date": "Mon, 5 Jun 2023 20:19:22 +0900", "Message-Id": "<20230605111923.3772260-17-zhirun.yan@intel.com>", "X-Mailer": "git-send-email 2.37.2", "In-Reply-To": "<20230605111923.3772260-1-zhirun.yan@intel.com>", "References": "<20230509060347.1237884-1-zhirun.yan@intel.com>\n <20230605111923.3772260-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 | 113 ++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 113 insertions(+)", "diff": "diff --git a/app/test/test_graph.c b/app/test/test_graph.c\nindex 1a2d1e6fab..d711b7deb9 100644\n--- a/app/test/test_graph.c\n+++ b/app/test/test_graph.c\n@@ -660,6 +660,115 @@ 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+\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\treturn -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\treturn -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\treturn -1;\n+\t}\n+\treturn 0;\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;\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\treturn -1;\n+\t}\n+\treturn 0;\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;\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\treturn -1;\n+\t}\n+\n+\tgraph = rte_graph_lookup(\"worker0-cloned-test2\");\n+\n+\tif (graph->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\treturn -1;\n+\t}\n+\n+\trte_graph_model_mcore_dispatch_core_unbind(cloned_graph_id);\n+\tif (graph->lcore_id != RTE_MAX_LCORE) {\n+\t\tprintf(\"unbind graph %s(id:%d) failed %d\\n\",\n+\t\t graph->name, graph->id, graph->lcore_id);\n+\t\treturn -1;\n+\t}\n+\treturn 0;\n+}\n+\n+static int\n+test_graph_worker_model_set_get(void)\n+{\n+\tint ret;\n+\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\treturn -1;\n+\t}\n+\n+\tif (rte_graph_worker_model_get() != RTE_GRAPH_MODEL_MCORE_DISPATCH) {\n+\t\tprintf(\"Get graph worker model failed\\n\");\n+\t\treturn -1;\n+\t}\n+\treturn 0;\n+}\n+\n static int\n test_graph_walk(void)\n {\n@@ -837,6 +946,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": [ "v7", "16/17" ] }{ "id": 128137, "url": "