Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/126784/?format=api
http://patches.dpdk.org/api/patches/126784/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230509060347.1237884-5-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": "<20230509060347.1237884-5-zhirun.yan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230509060347.1237884-5-zhirun.yan@intel.com", "date": "2023-05-09T06:03:36", "name": "[v6,04/15] graph: add get/set graph worker model APIs", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "e56abd25b1d8a94f89399d9ec9101b74770c4855", "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/20230509060347.1237884-5-zhirun.yan@intel.com/mbox/", "series": [ { "id": 27966, "url": "http://patches.dpdk.org/api/series/27966/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27966", "date": "2023-05-09T06:03:32", "name": "graph enhancement for multi-core dispatch", "version": 6, "mbox": "http://patches.dpdk.org/series/27966/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/126784/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/126784/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 49BB042AA0;\n\tTue, 9 May 2023 08:04:32 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 480F742D37;\n\tTue, 9 May 2023 08:04:10 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id B639942D40\n for <dev@dpdk.org>; Tue, 9 May 2023 08:04:08 +0200 (CEST)", "from fmsmga007.fm.intel.com ([10.253.24.52])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 May 2023 23:04:08 -0700", "from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.94])\n by fmsmga007.fm.intel.com with ESMTP; 08 May 2023 23:04:05 -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=1683612248; x=1715148248;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=Y0p9ycf5KX5Nmp9xu6w3rLj36yHyTpDmklm5oc4pBY8=;\n b=i3Uc/aIEyb3LTHlOOVsr2sMDEyA3tWoV+yW9JkGEMBOXsThHqSbVwrUv\n ByGlSP/C7oTt+JTvzfmEfVVZsuqtPPmoDg3NxiefGiiE7Bqy98QgakOl5\n Pp6rMmmJKIi1m2KOH2+gvnpXPFMJk2niLRuY5pTM1OrjxjceWCKFUlp93\n cSQfaffOWdS7tHf5XTixakIr0AwoGueTmqwlWuwOa3r+QBggsqZGEd8mq\n aTQ+/5duVHsEG7ZuGDu1s3EFWazwoFZUo4o42JxA5iuouoH00/fkA49KY\n 4e2gp5siXVAM5fmjtoepklyluoTIcX07fh4+lzbQI69lrtljZyo5LkdKe g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10704\"; a=\"351983076\"", "E=Sophos;i=\"5.99,261,1677571200\"; d=\"scan'208\";a=\"351983076\"", "E=McAfee;i=\"6600,9927,10704\"; a=\"701700148\"", "E=Sophos;i=\"5.99,261,1677571200\"; d=\"scan'208\";a=\"701700148\"" ], "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", "Cc": "cunming.liang@intel.com, haiyue.wang@intel.com,\n Zhirun Yan <zhirun.yan@intel.com>", "Subject": "[PATCH v6 04/15] graph: add get/set graph worker model APIs", "Date": "Tue, 9 May 2023 15:03:36 +0900", "Message-Id": "<20230509060347.1237884-5-zhirun.yan@intel.com>", "X-Mailer": "git-send-email 2.37.2", "In-Reply-To": "<20230509060347.1237884-1-zhirun.yan@intel.com>", "References": "<20230331040306.3143693-1-zhirun.yan@intel.com>\n <20230509060347.1237884-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 new get/set APIs to configure graph worker model which is used to\ndetermine which model will be chosen.\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 lib/graph/meson.build | 1 +\n lib/graph/rte_graph_worker.c | 54 +++++++++++++++++++++++++++++\n lib/graph/rte_graph_worker_common.h | 19 ++++++++++\n lib/graph/version.map | 3 ++\n 4 files changed, 77 insertions(+)\n create mode 100644 lib/graph/rte_graph_worker.c", "diff": "diff --git a/lib/graph/meson.build b/lib/graph/meson.build\nindex 3526d1b5d4..9fab8243da 100644\n--- a/lib/graph/meson.build\n+++ b/lib/graph/meson.build\n@@ -15,6 +15,7 @@ sources = files(\n 'graph_stats.c',\n 'graph_populate.c',\n 'graph_pcap.c',\n+ 'rte_graph_worker.c',\n )\n headers = files('rte_graph.h', 'rte_graph_worker.h')\n \ndiff --git a/lib/graph/rte_graph_worker.c b/lib/graph/rte_graph_worker.c\nnew file mode 100644\nindex 0000000000..cabc101262\n--- /dev/null\n+++ b/lib/graph/rte_graph_worker.c\n@@ -0,0 +1,54 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2023 Intel Corporation\n+ */\n+\n+#include \"rte_graph_worker_common.h\"\n+\n+RTE_DEFINE_PER_LCORE(enum rte_graph_worker_model, worker_model) = RTE_GRAPH_MODEL_DEFAULT;\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ * Set the graph worker model\n+ *\n+ * @note This function does not perform any locking, and is only safe to call\n+ * before graph running.\n+ *\n+ * @param name\n+ * Name of the graph worker model.\n+ *\n+ * @return\n+ * 0 on success, -1 otherwise.\n+ */\n+int\n+rte_graph_worker_model_set(enum rte_graph_worker_model model)\n+{\n+\tif (model >= RTE_GRAPH_MODEL_LIST_END)\n+\t\tgoto fail;\n+\n+\tRTE_PER_LCORE(worker_model) = model;\n+\treturn 0;\n+\n+fail:\n+\tRTE_PER_LCORE(worker_model) = RTE_GRAPH_MODEL_DEFAULT;\n+\treturn -1;\n+}\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ *\n+ * Get the graph worker model\n+ *\n+ * @param name\n+ * Name of the graph worker model.\n+ *\n+ * @return\n+ * Graph worker model on success.\n+ */\n+inline\n+enum rte_graph_worker_model\n+rte_graph_worker_model_get(void)\n+{\n+\treturn RTE_PER_LCORE(worker_model);\n+}\ndiff --git a/lib/graph/rte_graph_worker_common.h b/lib/graph/rte_graph_worker_common.h\nindex e25eabc81f..9bde8856ae 100644\n--- a/lib/graph/rte_graph_worker_common.h\n+++ b/lib/graph/rte_graph_worker_common.h\n@@ -19,6 +19,7 @@\n #include <rte_compat.h>\n #include <rte_common.h>\n #include <rte_cycles.h>\n+#include <rte_per_lcore.h>\n #include <rte_prefetch.h>\n #include <rte_memcpy.h>\n #include <rte_memory.h>\n@@ -95,6 +96,16 @@ struct rte_node {\n \tstruct rte_node *nodes[] __rte_cache_min_aligned; /**< Next nodes. */\n } __rte_cache_aligned;\n \n+/** Graph worker models */\n+enum rte_graph_worker_model {\n+\tRTE_GRAPH_MODEL_DEFAULT,\n+\tRTE_GRAPH_MODEL_RTC = RTE_GRAPH_MODEL_DEFAULT,\n+\tRTE_GRAPH_MODEL_MCORE_DISPATCH,\n+\tRTE_GRAPH_MODEL_LIST_END\n+};\n+\n+RTE_DECLARE_PER_LCORE(enum rte_graph_worker_model, worker_model);\n+\n /**\n * @internal\n *\n@@ -490,6 +501,14 @@ rte_node_next_stream_move(struct rte_graph *graph, struct rte_node *src,\n \t}\n }\n \n+__rte_experimental\n+enum rte_graph_worker_model\n+rte_graph_worker_model_get(void);\n+\n+__rte_experimental\n+int\n+rte_graph_worker_model_set(enum rte_graph_worker_model model);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/graph/version.map b/lib/graph/version.map\nindex 13b838752d..eea73ec9ca 100644\n--- a/lib/graph/version.map\n+++ b/lib/graph/version.map\n@@ -43,5 +43,8 @@ EXPERIMENTAL {\n \trte_node_next_stream_put;\n \trte_node_next_stream_move;\n \n+\trte_graph_worker_model_set;\n+\trte_graph_worker_model_get;\n+\n \tlocal: *;\n };\n", "prefixes": [ "v6", "04/15" ] }{ "id": 126784, "url": "