Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/125659/?format=api
http://patches.dpdk.org/api/patches/125659/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230331040306.3143693-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": "<20230331040306.3143693-5-zhirun.yan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230331040306.3143693-5-zhirun.yan@intel.com", "date": "2023-03-31T04:02:55", "name": "[v5,04/15] graph: add get/set graph worker model APIs", "commit_ref": null, "pull_url": null, "state": "superseded", "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/20230331040306.3143693-5-zhirun.yan@intel.com/mbox/", "series": [ { "id": 27590, "url": "http://patches.dpdk.org/api/series/27590/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27590", "date": "2023-03-31T04:02:51", "name": "graph enhancement for multi-core dispatch", "version": 5, "mbox": "http://patches.dpdk.org/series/27590/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/125659/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/125659/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 544684287E;\n\tFri, 31 Mar 2023 06:03:44 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2F45842D17;\n\tFri, 31 Mar 2023 06:03:28 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id 918DD42BB1\n for <dev@dpdk.org>; Fri, 31 Mar 2023 06:03:22 +0200 (CEST)", "from fmsmga007.fm.intel.com ([10.253.24.52])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 30 Mar 2023 21:03:21 -0700", "from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.68])\n by fmsmga007.fm.intel.com with ESMTP; 30 Mar 2023 21:03:19 -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=1680235402; x=1711771402;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=4y65Umh6mepIreusFAJcS4HK+KVCADFMVvvhxc5T9Do=;\n b=nRgS/BEYVM5TnAfjut7GG5g/ecWsnrNk48ArGQpi7cIYtdHihRYy3P5E\n 0KFuUip+haF7cXEXxNswr0fnemEkHsVmV8xwz7m2t9xUSGcONpI9kG7SB\n hqdASfitJrMrZbf8dSD12xEL3R06n2gSd2HFOYEVsyO+tYS4aVt4fZr0e\n NOvDjXkHypJb3Y2tgMmv+Kdudt3QZgeqxoApFHlzJYdZms7dkCIqG4f9F\n jeFds6Y8LT1h3UldgryhtZqbFoTb7w9h+GkwMEmxTBm8fElP1fP2BGlNl\n mdGjkYfKC2VDsrKpXesA0NlvyvDVFeuilZJfQFftH2n511glz2U/TsPJQ w==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10665\"; a=\"338849072\"", "E=Sophos;i=\"5.98,306,1673942400\"; d=\"scan'208\";a=\"338849072\"", "E=McAfee;i=\"6600,9927,10665\"; a=\"687502246\"", "E=Sophos;i=\"5.98,306,1673942400\"; d=\"scan'208\";a=\"687502246\"" ], "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", "Cc": "cunming.liang@intel.com, haiyue.wang@intel.com,\n Zhirun Yan <zhirun.yan@intel.com>", "Subject": "[PATCH v5 04/15] graph: add get/set graph worker model APIs", "Date": "Fri, 31 Mar 2023 13:02:55 +0900", "Message-Id": "<20230331040306.3143693-5-zhirun.yan@intel.com>", "X-Mailer": "git-send-email 2.37.2", "In-Reply-To": "<20230331040306.3143693-1-zhirun.yan@intel.com>", "References": "<20230330061834.3118201-1-zhirun.yan@intel.com>\n <20230331040306.3143693-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 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": [ "v5", "04/15" ] }{ "id": 125659, "url": "