Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/125575/?format=api
http://patches.dpdk.org/api/patches/125575/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230329064340.2550530-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": "<20230329064340.2550530-5-zhirun.yan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230329064340.2550530-5-zhirun.yan@intel.com", "date": "2023-03-29T06:43:29", "name": "[v3,04/15] graph: add get/set graph worker model APIs", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a9413fee155acb21e878ab7e4953ce000e2705d3", "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/20230329064340.2550530-5-zhirun.yan@intel.com/mbox/", "series": [ { "id": 27571, "url": "http://patches.dpdk.org/api/series/27571/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27571", "date": "2023-03-29T06:43:25", "name": "graph enhancement for multi-core dispatch", "version": 3, "mbox": "http://patches.dpdk.org/series/27571/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/125575/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/125575/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 BB8524285E;\n\tWed, 29 Mar 2023 08:44:20 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 16A3042D16;\n\tWed, 29 Mar 2023 08:44:02 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id B470142C76\n for <dev@dpdk.org>; Wed, 29 Mar 2023 08:43:59 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Mar 2023 23:43:59 -0700", "from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.68])\n by fmsmga002.fm.intel.com with ESMTP; 28 Mar 2023 23:43:57 -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=1680072239; x=1711608239;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=hSkkOaUFMpsqzBebU04yzhPHQkDzrf+RBo53nvL7xUA=;\n b=N6/Au+C3mkP9tI3KbljqFHr+GuIU6LvCuF2TygzlOtorePuwZmRSicXw\n ARyD1aJRacabAoaoj9VhKVyJBMg7c+qKf75GxYx0tG45kDwYNgmY17eG9\n JEcgEPXHtPhTpHPhaFCi1rTaq/E9GP5zLUUsE4JiE8nz9quE9/A/0gyCI\n 2i/jO0bsIiktrRMdv8owaDB2kxWEw029tSt+Py6I0H/ZTJ/jCNc/O0v2g\n TqRzqUyOY5HrYOX8FMG673RUgZJuFSkm0QUQbJf1+qhOPAwTIbF3wR2Z/\n zeVgEAgli/DAs0Jx3p9CLXMG6B9Yq9IGof9uDuFyteZu4wYWwlBIAEIed w==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10663\"; a=\"329260459\"", "E=Sophos;i=\"5.98,300,1673942400\"; d=\"scan'208\";a=\"329260459\"", "E=McAfee;i=\"6600,9927,10663\"; a=\"795104951\"", "E=Sophos;i=\"5.98,300,1673942400\"; d=\"scan'208\";a=\"795104951\"" ], "X-ExtLoop1": "1", "From": "Zhirun Yan <zhirun.yan@intel.com>", "To": "dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com,\n ndabilpuram@marvell.com", "Cc": "cunming.liang@intel.com, haiyue.wang@intel.com,\n Zhirun Yan <zhirun.yan@intel.com>", "Subject": "[PATCH v3 04/15] graph: add get/set graph worker model APIs", "Date": "Wed, 29 Mar 2023 15:43:29 +0900", "Message-Id": "<20230329064340.2550530-5-zhirun.yan@intel.com>", "X-Mailer": "git-send-email 2.37.2", "In-Reply-To": "<20230329064340.2550530-1-zhirun.yan@intel.com>", "References": "<20230324021622.1369006-1-zhirun.yan@intel.com>\n <20230329064340.2550530-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..692ee1b0d2\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+inline 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 41428974db..1526da6e2c 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": [ "v3", "04/15" ] }{ "id": 125575, "url": "