get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128222,
    "url": "http://patchwork.dpdk.org/api/patches/128222/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230606144746.708388-17-zhirun.yan@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230606144746.708388-17-zhirun.yan@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230606144746.708388-17-zhirun.yan@intel.com",
    "date": "2023-06-06T14:47:45",
    "name": "[v8,16/17] test/graph: add functional tests for mcore dispatch model",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "099ed5123efbd8ec6bacbbe0888a23784bc72d8b",
    "submitter": {
        "id": 1154,
        "url": "http://patchwork.dpdk.org/api/people/1154/?format=api",
        "name": "Yan, Zhirun",
        "email": "zhirun.yan@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230606144746.708388-17-zhirun.yan@intel.com/mbox/",
    "series": [
        {
            "id": 28374,
            "url": "http://patchwork.dpdk.org/api/series/28374/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28374",
            "date": "2023-06-06T14:47:29",
            "name": "graph enhancement for multi-core dispatch",
            "version": 8,
            "mbox": "http://patchwork.dpdk.org/series/28374/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/128222/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/128222/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 5C0D642C40;\n\tTue,  6 Jun 2023 16:56:26 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7A47142D9C;\n\tTue,  6 Jun 2023 16:55:41 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id DC0D542D9B\n for <dev@dpdk.org>; Tue,  6 Jun 2023 16:55:39 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Jun 2023 07:55:31 -0700",
            "from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.94])\n by fmsmga005.fm.intel.com with ESMTP; 06 Jun 2023 07:55:28 -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=1686063340; x=1717599340;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=/aH3uCFjZrEBviR84ETSn0XhAf1vbBn6Wq86MtM8wd0=;\n b=SMbXSPtvgeGl+gY4askotfu0GJgDFBMu5IuVJc/6ma/WDdtEdlOTyEbx\n 258EqE+hDmCOkeNvu3CEx2nq9EdB4M7x/H2JPw8jc9fkQVOq1MHoS8u43\n L0ysawc2CbV+iGgfkv3GMohKJjFL6ByvfzLtQO++aC1YvtSWr/sBvWlR3\n 1rLB+o1Tti0CkKRl+fGjmK6qx4vyMBNUwraY9ayp2LfG0E9Rb+U7hW5hg\n Ee3skns0zo7dqQaT9rSwhK7TpNWTK6m7sxsR58WcaK1HvwGndIzPLmMfD\n VBehQGI/iM3Ptq+WPNCNMcCecDelEQncqBeD80GkauQs0+jlDgXYROLRG w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10733\"; a=\"356705723\"",
            "E=Sophos;i=\"6.00,221,1681196400\"; d=\"scan'208\";a=\"356705723\"",
            "E=McAfee;i=\"6600,9927,10733\"; a=\"1039223027\"",
            "E=Sophos;i=\"6.00,221,1681196400\"; d=\"scan'208\";a=\"1039223027\""
        ],
        "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",
        "Cc": "cunming.liang@intel.com, haiyue.wang@intel.com,\n mattias.ronnblom@ericsson.com, Zhirun Yan <zhirun.yan@intel.com>",
        "Subject": "[PATCH v8 16/17] test/graph: add functional tests for mcore dispatch\n model",
        "Date": "Tue,  6 Jun 2023 22:47:45 +0800",
        "Message-Id": "<20230606144746.708388-17-zhirun.yan@intel.com>",
        "X-Mailer": "git-send-email 2.37.2",
        "In-Reply-To": "<20230606144746.708388-1-zhirun.yan@intel.com>",
        "References": "<20230605111923.3772260-1-zhirun.yan@intel.com>\n <20230606144746.708388-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 functional test for mcore dispatch model including graph clone,\ngraph model set/get, node worker affinity, graph worker binding/unbinding.\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 app/test/test_graph.c | 130 ++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 130 insertions(+)",
    "diff": "diff --git a/app/test/test_graph.c b/app/test/test_graph.c\nindex 1a2d1e6fab..8609c0b3a4 100644\n--- a/app/test/test_graph.c\n+++ b/app/test/test_graph.c\n@@ -660,6 +660,132 @@ test_create_graph(void)\n \treturn 0;\n }\n \n+static int\n+test_graph_clone(void)\n+{\n+\trte_graph_t cloned_graph_id = RTE_GRAPH_ID_INVALID;\n+\trte_graph_t main_graph_id = RTE_GRAPH_ID_INVALID;\n+\tstruct rte_graph_param graph_conf;\n+\tint ret = 0;\n+\n+\tmain_graph_id = rte_graph_from_name(\"worker0\");\n+\tif (main_graph_id == RTE_GRAPH_ID_INVALID) {\n+\t\tprintf(\"Must create main graph first\\n\");\n+\t\tret = -1;\n+\t}\n+\n+\tgraph_conf.dispatch.mp_capacity = 1024;\n+\tgraph_conf.dispatch.wq_size_max = 32;\n+\n+\tcloned_graph_id = rte_graph_clone(main_graph_id, \"cloned-test0\", &graph_conf);\n+\n+\tif (cloned_graph_id == RTE_GRAPH_ID_INVALID) {\n+\t\tprintf(\"Graph creation failed with error = %d\\n\", rte_errno);\n+\t\tret = -1;\n+\t}\n+\n+\tif (strcmp(rte_graph_id_to_name(cloned_graph_id), \"worker0-cloned-test0\")) {\n+\t\tprintf(\"Cloned graph should name as %s but get %s\\n\", \"worker0-cloned-test\",\n+\t\t       rte_graph_id_to_name(cloned_graph_id));\n+\t\tret = -1;\n+\t}\n+\n+\trte_graph_destroy(cloned_graph_id);\n+\n+\treturn ret;\n+}\n+\n+static int\n+test_graph_model_mcore_dispatch_node_lcore_affinity_set(void)\n+{\n+\trte_graph_t cloned_graph_id = RTE_GRAPH_ID_INVALID;\n+\tunsigned int worker_lcore = RTE_MAX_LCORE;\n+\trte_node_t nid = RTE_NODE_ID_INVALID;\n+\tchar node_name[64] = \"test_node00\";\n+\tstruct rte_node *node;\n+\tint ret = 0;\n+\n+\tworker_lcore = rte_get_next_lcore(worker_lcore, true, 1);\n+\tret = rte_graph_model_mcore_dispatch_node_lcore_affinity_set(node_name, worker_lcore);\n+\tif (ret == 0)\n+\t\tprintf(\"Set node %s affinity to lcore %u\\n\", node_name, worker_lcore);\n+\n+\tnid = rte_node_from_name(node_name);\n+\tcloned_graph_id = rte_graph_clone(graph_id, \"cloned-test1\", NULL);\n+\tnode = rte_graph_node_get(cloned_graph_id, nid);\n+\n+\tif (node->dispatch.lcore_id != worker_lcore) {\n+\t\tprintf(\"set node affinity failed\\n\");\n+\t\tret = -1;\n+\t}\n+\n+\trte_graph_destroy(cloned_graph_id);\n+\n+\treturn ret;\n+}\n+\n+static int\n+test_graph_model_mcore_dispatch_core_bind_unbind(void)\n+{\n+\trte_graph_t cloned_graph_id = RTE_GRAPH_ID_INVALID;\n+\tunsigned int worker_lcore = RTE_MAX_LCORE;\n+\tstruct rte_graph *graph;\n+\tint ret = 0;\n+\n+\tworker_lcore = rte_get_next_lcore(worker_lcore, true, 1);\n+\tcloned_graph_id = rte_graph_clone(graph_id, \"cloned-test2\", NULL);\n+\n+\tret = rte_graph_model_mcore_dispatch_core_bind(cloned_graph_id, worker_lcore);\n+\tif (ret != 0) {\n+\t\tprintf(\"bind graph %d to lcore %u failed\\n\", graph_id, worker_lcore);\n+\t\tret = -1;\n+\t}\n+\n+\tgraph = rte_graph_lookup(\"worker0-cloned-test2\");\n+\n+\tif (graph->dispatch.lcore_id != worker_lcore) {\n+\t\tprintf(\"bind graph %s(id:%d) with lcore %u failed\\n\",\n+\t\t       graph->name, graph->id, worker_lcore);\n+\t\tret = -1;\n+\t}\n+\n+\trte_graph_model_mcore_dispatch_core_unbind(cloned_graph_id);\n+\tif (graph->dispatch.lcore_id != RTE_MAX_LCORE) {\n+\t\tprintf(\"unbind graph %s(id:%d) failed %d\\n\",\n+\t\t       graph->name, graph->id, graph->dispatch.lcore_id);\n+\t\tret = -1;\n+\t}\n+\n+\trte_graph_destroy(cloned_graph_id);\n+\n+\treturn ret;\n+}\n+\n+static int\n+test_graph_worker_model_set_get(void)\n+{\n+\trte_graph_t cloned_graph_id = RTE_GRAPH_ID_INVALID;\n+\tstruct rte_graph *graph;\n+\tint ret = 0;\n+\n+\tcloned_graph_id = rte_graph_clone(graph_id, \"cloned-test3\", NULL);\n+\tret = rte_graph_worker_model_set(RTE_GRAPH_MODEL_MCORE_DISPATCH);\n+\tif (ret != 0) {\n+\t\tprintf(\"Set graph mcore dispatch model failed\\n\");\n+\t\tret = -1;\n+\t}\n+\n+\tgraph = rte_graph_lookup(\"worker0-cloned-test3\");\n+\tif (rte_graph_worker_model_get(graph) != RTE_GRAPH_MODEL_MCORE_DISPATCH) {\n+\t\tprintf(\"Get graph worker model failed\\n\");\n+\t\tret = -1;\n+\t}\n+\n+\trte_graph_destroy(cloned_graph_id);\n+\n+\treturn 0;\n+}\n+\n static int\n test_graph_walk(void)\n {\n@@ -837,6 +963,10 @@ static struct unit_test_suite graph_testsuite = {\n \t\tTEST_CASE(test_update_edges),\n \t\tTEST_CASE(test_lookup_functions),\n \t\tTEST_CASE(test_create_graph),\n+\t\tTEST_CASE(test_graph_clone),\n+\t\tTEST_CASE(test_graph_model_mcore_dispatch_node_lcore_affinity_set),\n+\t\tTEST_CASE(test_graph_model_mcore_dispatch_core_bind_unbind),\n+\t\tTEST_CASE(test_graph_worker_model_set_get),\n \t\tTEST_CASE(test_graph_lookup_functions),\n \t\tTEST_CASE(test_graph_walk),\n \t\tTEST_CASE(test_print_stats),\n",
    "prefixes": [
        "v8",
        "16/17"
    ]
}