get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/125620/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 125620,
    "url": "http://patches.dpdk.org/api/patches/125620/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230330061834.3118201-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": "<20230330061834.3118201-5-zhirun.yan@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230330061834.3118201-5-zhirun.yan@intel.com",
    "date": "2023-03-30T06:18:23",
    "name": "[v4,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/20230330061834.3118201-5-zhirun.yan@intel.com/mbox/",
    "series": [
        {
            "id": 27579,
            "url": "http://patches.dpdk.org/api/series/27579/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27579",
            "date": "2023-03-30T06:18:19",
            "name": "graph enhancement for multi-core dispatch",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/27579/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/125620/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/125620/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 08E7B4286D;\n\tThu, 30 Mar 2023 08:19:13 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 88AC642D12;\n\tThu, 30 Mar 2023 08:18:52 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 87C5742BDA\n for <dev@dpdk.org>; Thu, 30 Mar 2023 08:18:49 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Mar 2023 23:18:49 -0700",
            "from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.68])\n by fmsmga001.fm.intel.com with ESMTP; 29 Mar 2023 23:18:47 -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=1680157129; x=1711693129;\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=L9ASsRcXNxfTwcykfhMcFOStati/4HwGYqXvxVKSvQGtMkHNIeio0cZe\n ZwcKpdkhp99l90oYuCTIchMU162KggP+79dnmIroGDUyJt85hW6lQXU89\n 5xt+n95BRY7gllPHV8gm5SZNFj4nq9TiQoZoAl8y0xsm1EjUwoHVc7byC\n 7q7G2uoQAQjVaOpANDQwt/tmwPn+HcVdf0TxSuEBMiUt9Amce3ndcouD9\n HxBFNSQxVYHRWgY06jUKsAJE3I/wL1n1NyZD3y1NsPTe29oTldcbWKrAi\n GXxPRI2Uu1j0O70lnnPecdBxP4F8wGqzVj+B8qfdsGmQpfaY/dsRgURGG Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10664\"; a=\"343530578\"",
            "E=Sophos;i=\"5.98,303,1673942400\"; d=\"scan'208\";a=\"343530578\"",
            "E=McAfee;i=\"6600,9927,10664\"; a=\"828176179\"",
            "E=Sophos;i=\"5.98,303,1673942400\"; d=\"scan'208\";a=\"828176179\""
        ],
        "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 v4 04/15] graph: add get/set graph worker model APIs",
        "Date": "Thu, 30 Mar 2023 15:18:23 +0900",
        "Message-Id": "<20230330061834.3118201-5-zhirun.yan@intel.com>",
        "X-Mailer": "git-send-email 2.37.2",
        "In-Reply-To": "<20230330061834.3118201-1-zhirun.yan@intel.com>",
        "References": "<20230329064340.2550530-1-zhirun.yan@intel.com>\n <20230330061834.3118201-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": [
        "v4",
        "04/15"
    ]
}