Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/128494/?format=api
http://patches.dpdk.org/api/patches/128494/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230609191245.252521-14-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-14-zhirun.yan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230609191245.252521-14-zhirun.yan@intel.com", "date": "2023-06-09T19:12:42", "name": "[v12,13/16] graph: enable graph multicore dispatch scheduler model", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "9dd8f1fca2818598f22957a0b688b2daa334ddc9", "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-14-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/128494/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/128494/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 C53A342C71;\n\tFri, 9 Jun 2023 21:21:31 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A25DA42D63;\n\tFri, 9 Jun 2023 21:20:29 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 510D142D82\n for <dev@dpdk.org>; Fri, 9 Jun 2023 21:20:27 +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:26 -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:24 -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=1686338427; x=1717874427;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=PbRAcqku2qwFKjQpRjCZ1/BAXJLK1K/Cj2WDWvQqwQU=;\n b=UbxF9BK/OfsHmSR6r48/DcLHJHj6YEMJeyxAr+knjAnWe4KYwJtOqBtm\n ZC7dpmTkz4c3L9DhBQ6qtle3DvKy7tOfrFYoVY1nXAdZuUSPQxMCWCYcD\n HqHwpgwSOhTBGCaSCFv4N9aqNvrPIWr8e0UctpkqvT6V2zxuYtOfJxXBz\n oI1qpOmgdlJbyLI+xA0uzPrV0hS2IMFUBHd+vlbTkmWbcift0RPPdJQox\n IGCdTKAIn83HnGoAmdslRCja9YWDW5rkD9g97A+NwmzRQnGNK5/rWGQce\n ysMj4nkA/dnkoO1NPZkOaf6Us0QaIYwg0IEDLU4I3zXw5Ymz5nF6myZIG Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10736\"; a=\"360155139\"", "E=Sophos;i=\"6.00,230,1681196400\"; d=\"scan'208\";a=\"360155139\"", "E=McAfee;i=\"6600,9927,10736\"; a=\"957254698\"", "E=Sophos;i=\"6.00,230,1681196400\"; d=\"scan'208\";a=\"957254698\"" ], "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 13/16] graph: enable graph multicore dispatch scheduler\n model", "Date": "Sat, 10 Jun 2023 03:12:42 +0800", "Message-Id": "<20230609191245.252521-14-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": "This patch enables to chose new scheduler model. Must define\nRTE_GRAPH_MODEL_SELECT before including rte_graph_worker.h\nto enable specific model choosing.\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: Jerin Jacob <jerinj@marvell.com>\nAcked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n doc/guides/prog_guide/graph_lib.rst | 71 ++++++++++++++++++++++++++---\n lib/graph/rte_graph_worker.h | 13 ++++++\n 2 files changed, 77 insertions(+), 7 deletions(-)", "diff": "diff --git a/doc/guides/prog_guide/graph_lib.rst b/doc/guides/prog_guide/graph_lib.rst\nindex 1cfdc86433..017cc25fd3 100644\n--- a/doc/guides/prog_guide/graph_lib.rst\n+++ b/doc/guides/prog_guide/graph_lib.rst\n@@ -189,13 +189,70 @@ In the above example, A graph object will be created with ethdev Rx\n node of port 0 and queue 0, all ipv4* nodes in the system,\n and ethdev tx node of all ports.\n \n-Multicore graph processing\n-~~~~~~~~~~~~~~~~~~~~~~~~~~\n-In the current graph library implementation, specifically,\n-``rte_graph_walk()`` and ``rte_node_enqueue*`` fast path API functions\n-are designed to work on single-core to have better performance.\n-The fast path API works on graph object, So the multi-core graph\n-processing strategy would be to create graph object PER WORKER.\n+Graph models\n+~~~~~~~~~~~~\n+There are two different kinds of graph walking models. User can select the model using\n+``rte_graph_worker_model_set()`` API. If the application decides to use only one model,\n+the fast path check can be avoided by defining the model with RTE_GRAPH_MODEL_SELECT.\n+For example:\n+\n+.. code-block:: console\n+\n+#define RTE_GRAPH_MODEL_SELECT RTE_GRAPH_MODEL_RTC\n+#include \"rte_graph_worker.h\"\n+\n+RTC (Run-To-Completion)\n+^^^^^^^^^^^^^^^^^^^^^^^\n+This is the default graph walking model. Specifically, ``rte_graph_walk_rtc()`` and\n+``rte_node_enqueue*`` fast path API functions are designed to work on single-core to\n+have better performance. The fast path API works on graph object, So the multi-core\n+graph processing strategy would be to create graph object PER WORKER.\n+\n+Example:\n+\n+Graph: node-0 -> node-1 -> node-2 @Core0.\n+\n+.. code-block:: diff\n+\n+ + - - - - - - - - - - - - - - - - - - - - - +\n+ ' Core #0 '\n+ ' '\n+ ' +--------+ +---------+ +--------+ '\n+ ' | Node-0 | --> | Node-1 | --> | Node-2 | '\n+ ' +--------+ +---------+ +--------+ '\n+ ' '\n+ + - - - - - - - - - - - - - - - - - - - - - +\n+\n+Dispatch model\n+^^^^^^^^^^^^^^\n+The dispatch model enables a cross-core dispatching mechanism which employs\n+a scheduling work-queue to dispatch streams to other worker cores which\n+being associated with the destination node.\n+\n+Use ``rte_graph_model_mcore_dispatch_lcore_affinity_set()`` to set lcore affinity\n+with the node.\n+Each worker core will have a graph repetition. Use ``rte_graph_clone()`` to clone\n+graph for each worker and use``rte_graph_model_mcore_dispatch_core_bind()`` to\n+bind graph with the worker core.\n+\n+Example:\n+\n+Graph topo: node-0 -> Core1; node-1 -> node-2; node-2 -> node-3.\n+Config graph: node-0 @Core0; node-1/3 @Core1; node-2 @Core2.\n+\n+.. code-block:: diff\n+\n+ + - - - - - -+ +- - - - - - - - - - - - - + + - - - - - -+\n+ ' Core #0 ' ' Core #1 ' ' Core #2 '\n+ ' ' ' ' ' '\n+ ' +--------+ ' ' +--------+ +--------+ ' ' +--------+ '\n+ ' | Node-0 | - - - ->| Node-1 | | Node-3 |<- - - - | Node-2 | '\n+ ' +--------+ ' ' +--------+ +--------+ ' ' +--------+ '\n+ ' ' ' | ' ' ^ '\n+ + - - - - - -+ +- - -|- - - - - - - - - - + + - - -|- - -+\n+ | |\n+ + - - - - - - - - - - - - - - - - +\n+\n \n In fast path\n ~~~~~~~~~~~~\ndiff --git a/lib/graph/rte_graph_worker.h b/lib/graph/rte_graph_worker.h\nindex 5b58f7bda9..6685600813 100644\n--- a/lib/graph/rte_graph_worker.h\n+++ b/lib/graph/rte_graph_worker.h\n@@ -11,6 +11,7 @@ extern \"C\" {\n #endif\n \n #include \"rte_graph_model_rtc.h\"\n+#include \"rte_graph_model_mcore_dispatch.h\"\n \n /**\n * Perform graph walk on the circular buffer and invoke the process function\n@@ -25,7 +26,19 @@ __rte_experimental\n static inline void\n rte_graph_walk(struct rte_graph *graph)\n {\n+#if defined(RTE_GRAPH_MODEL_SELECT) && (RTE_GRAPH_MODEL_SELECT == RTE_GRAPH_MODEL_RTC)\n \trte_graph_walk_rtc(graph);\n+#elif defined(RTE_GRAPH_MODEL_SELECT) && (RTE_GRAPH_MODEL_SELECT == RTE_GRAPH_MODEL_MCORE_DISPATCH)\n+\trte_graph_walk_mcore_dispatch(graph);\n+#else\n+\tswitch (rte_graph_worker_model_no_check_get(graph)) {\n+\tcase RTE_GRAPH_MODEL_MCORE_DISPATCH:\n+\t\trte_graph_walk_mcore_dispatch(graph);\n+\t\tbreak;\n+\tdefault:\n+\t\trte_graph_walk_rtc(graph);\n+\t}\n+#endif\n }\n \n #ifdef __cplusplus\n", "prefixes": [ "v12", "13/16" ] }{ "id": 128494, "url": "