get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 120253,
    "url": "https://patches.dpdk.org/api/patches/120253/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20221129082109.6809-6-syalavarthi@marvell.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20221129082109.6809-6-syalavarthi@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221129082109.6809-6-syalavarthi@marvell.com",
    "date": "2022-11-29T08:21:03",
    "name": "[v2,06/12] app/mldev: add test case to interleave inferences",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8ad36d98950492a5bcebe3a60942aef15c314575",
    "submitter": {
        "id": 2480,
        "url": "https://patches.dpdk.org/api/people/2480/?format=api",
        "name": "Srikanth Yalavarthi",
        "email": "syalavarthi@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20221129082109.6809-6-syalavarthi@marvell.com/mbox/",
    "series": [
        {
            "id": 25915,
            "url": "https://patches.dpdk.org/api/series/25915/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=25915",
            "date": "2022-11-29T08:20:58",
            "name": "[v2,01/12] app/mldev: implement test framework for mldev",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/25915/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/120253/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/120253/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 B8AD5A0093;\n\tTue, 29 Nov 2022 09:22:02 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7ABDF42D3D;\n\tTue, 29 Nov 2022 09:21:25 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 9249B42C29\n for <dev@dpdk.org>; Tue, 29 Nov 2022 09:21:18 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 2AT3NpLU005657 for <dev@dpdk.org>; Tue, 29 Nov 2022 00:21:17 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3m5a508yyp-5\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 29 Nov 2022 00:21:17 -0800",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Tue, 29 Nov 2022 00:21:15 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Tue, 29 Nov 2022 00:21:15 -0800",
            "from ml-host-33.caveonetworks.com (unknown [10.110.143.233])\n by maili.marvell.com (Postfix) with ESMTP id 19B713F706A;\n Tue, 29 Nov 2022 00:21:15 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-type; s=pfpt0220; bh=0Rz9efhGd5HpLaez3RtpgQdD0rjoRv+UxSyzmCA8Erc=;\n b=cB/pSfunXMJozOTTVq/jDgvCABi2RjSx+m4Z7wmNXhS9B7pp2IBp8wZ+MXu5NX7IVIlF\n PvOiKr5DvsFQ1lGf3rVkcbplylaOCwDIA5VoHgfUmzVrooqYkXs3PF7X93PnjilPgPui\n 6eMV/qSkwXWn8kcYn8YjosnDqg0oT2pb3tnKTNdjEI7qhfrcAvcdLBKNHDY2xS9HsWAF\n 9gPzLhNrODSgEuuLe5OrUNS1MQgJJHGOYs8Elocy2UWY1aqCN1OAg68kIc6qP5Xdq3ae\n ohivnxVWkQIV13ixkPWdFyvb4lHWpq9fbHAAZYt6etCEgTeKxm1KW0c7IfEOFabRYqhn AA==",
        "From": "Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "To": "Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "CC": "<dev@dpdk.org>, <sshankarnara@marvell.com>, <jerinj@marvell.com>",
        "Subject": "[PATCH v2 06/12] app/mldev: add test case to interleave inferences",
        "Date": "Tue, 29 Nov 2022 00:21:03 -0800",
        "Message-ID": "<20221129082109.6809-6-syalavarthi@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20221129082109.6809-1-syalavarthi@marvell.com>",
        "References": "<20221129070746.20396-2-syalavarthi@marvell.com>\n <20221129082109.6809-1-syalavarthi@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "I-MJIGheO-uWknjVKHsUNjnoFuuDsmSu",
        "X-Proofpoint-GUID": "I-MJIGheO-uWknjVKHsUNjnoFuuDsmSu",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1\n definitions=2022-11-29_06,2022-11-28_02,2022-06-22_01",
        "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": "Added test case to interleave inference requests from multiple\nmodels. Interleaving would load and start all models and launch\ninference requests for the models using available queue-pairs\n\nOperations sequence when testing with N models and R reps,\n\n(load + start) x N -> (enqueue + dequeue) x N x R ...\n\t-> (stop + unload) x N\n\nTest can be executed by selecting \"inference_interleave\" test.\n\nSigned-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>\n---\n app/test-mldev/meson.build                 |   1 +\n app/test-mldev/ml_options.c                |   3 +-\n app/test-mldev/test_inference_common.c     |  12 +--\n app/test-mldev/test_inference_common.h     |   4 +-\n app/test-mldev/test_inference_interleave.c | 118 +++++++++++++++++++++\n 5 files changed, 129 insertions(+), 9 deletions(-)\n create mode 100644 app/test-mldev/test_inference_interleave.c",
    "diff": "diff --git a/app/test-mldev/meson.build b/app/test-mldev/meson.build\nindex 475d76d126..41d22fb22c 100644\n--- a/app/test-mldev/meson.build\n+++ b/app/test-mldev/meson.build\n@@ -18,6 +18,7 @@ sources = files(\n         'test_model_ops.c',\n         'test_inference_common.c',\n         'test_inference_ordered.c',\n+        'test_inference_interleave.c',\n )\n \n deps += ['mldev']\ndiff --git a/app/test-mldev/ml_options.c b/app/test-mldev/ml_options.c\nindex 10dad18fff..01ea050ee7 100644\n--- a/app/test-mldev/ml_options.c\n+++ b/app/test-mldev/ml_options.c\n@@ -162,7 +162,8 @@ ml_dump_test_options(const char *testname)\n \t\tprintf(\"\\n\");\n \t}\n \n-\tif (strcmp(testname, \"inference_ordered\") == 0) {\n+\tif ((strcmp(testname, \"inference_ordered\") == 0) ||\n+\t    (strcmp(testname, \"inference_interleave\") == 0)) {\n \t\tprintf(\"\\t\\t--filelist         : comma separated list of model, input and output\\n\"\n \t\t       \"\\t\\t--repetitions      : number of inference repetitions\\n\");\n \t\tprintf(\"\\n\");\ndiff --git a/app/test-mldev/test_inference_common.c b/app/test-mldev/test_inference_common.c\nindex 8b5dc89346..f0b15861a0 100644\n--- a/app/test-mldev/test_inference_common.c\n+++ b/app/test-mldev/test_inference_common.c\n@@ -115,7 +115,7 @@ ml_dequeue_single(void *arg)\n \t\ttotal_deq += burst_deq;\n \t\tif (unlikely(op->status == RTE_ML_OP_STATUS_ERROR)) {\n \t\t\trte_ml_op_error_get(t->cmn.opt->dev_id, op, &error);\n-\t\t\tml_err(\"error_code = 0x%016lx, error_message = %s\\n\", error.errcode,\n+\t\t\tml_err(\"error_code = 0x%\" PRIx64 \", error_message = %s\\n\", error.errcode,\n \t\t\t       error.message);\n \t\t}\n \t\treq = (struct ml_request *)op->user_ptr;\n@@ -334,10 +334,10 @@ ml_request_initialize(struct rte_mempool *mp, void *opaque, void *obj, unsigned\n \tRTE_SET_USED(mp);\n \tRTE_SET_USED(obj_idx);\n \n-\treq->input = RTE_PTR_ADD(\n-\t\tobj, RTE_ALIGN_CEIL(sizeof(struct ml_request), t->cmn.dev_info.min_align_size));\n-\treq->output = RTE_PTR_ADD(req->input, RTE_ALIGN_CEIL(t->model[t->fid].inp_qsize,\n-\t\t\t\t\t\t\t     t->cmn.dev_info.min_align_size));\n+\treq->input = (uint8_t *)obj +\n+\t\t     RTE_ALIGN_CEIL(sizeof(struct ml_request), t->cmn.dev_info.min_align_size);\n+\treq->output = req->input +\n+\t\t      RTE_ALIGN_CEIL(t->model[t->fid].inp_qsize, t->cmn.dev_info.min_align_size);\n \treq->niters = 0;\n \n \t/* quantize data */\n@@ -387,7 +387,7 @@ ml_inference_iomem_setup(struct ml_test *test, struct ml_options *opt, int16_t f\n \t}\n \n \tt->model[fid].input = mz->addr;\n-\tt->model[fid].output = RTE_PTR_ADD(t->model[fid].input, t->model[fid].inp_dsize);\n+\tt->model[fid].output = t->model[fid].input + t->model[fid].inp_dsize;\n \n \t/* load input file */\n \tfp = fopen(opt->filelist[fid].input, \"r\");\ndiff --git a/app/test-mldev/test_inference_common.h b/app/test-mldev/test_inference_common.h\nindex 91007954b4..b058abada4 100644\n--- a/app/test-mldev/test_inference_common.h\n+++ b/app/test-mldev/test_inference_common.h\n@@ -17,8 +17,8 @@\n #include \"test_model_common.h\"\n \n struct ml_request {\n-\tvoid *input;\n-\tvoid *output;\n+\tuint8_t *input;\n+\tuint8_t *output;\n \tint16_t fid;\n \tuint64_t niters;\n };\ndiff --git a/app/test-mldev/test_inference_interleave.c b/app/test-mldev/test_inference_interleave.c\nnew file mode 100644\nindex 0000000000..74ad0c597f\n--- /dev/null\n+++ b/app/test-mldev/test_inference_interleave.c\n@@ -0,0 +1,118 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2022 Marvell.\n+ */\n+\n+#include <stdint.h>\n+\n+#include <rte_common.h>\n+#include <rte_launch.h>\n+\n+#include \"ml_common.h\"\n+#include \"ml_test.h\"\n+#include \"test_inference_common.h\"\n+#include \"test_model_common.h\"\n+\n+static int\n+test_inference_interleave_driver(struct ml_test *test, struct ml_options *opt)\n+{\n+\tstruct test_inference *t;\n+\tint16_t fid = 0;\n+\tint ret = 0;\n+\n+\tt = ml_test_priv(test);\n+\n+\tret = ml_inference_mldev_setup(test, opt);\n+\tif (ret != 0)\n+\t\treturn ret;\n+\n+\tret = ml_inference_mem_setup(test, opt);\n+\tif (ret != 0)\n+\t\treturn ret;\n+\n+\t/* load and start all models */\n+\tfor (fid = 0; fid < opt->nb_filelist; fid++) {\n+\t\tret = ml_model_load(test, opt, &t->model[fid], fid);\n+\t\tif (ret != 0)\n+\t\t\tgoto error;\n+\n+\t\tret = ml_model_start(test, opt, &t->model[fid], fid);\n+\t\tif (ret != 0)\n+\t\t\tgoto error;\n+\n+\t\tret = ml_inference_iomem_setup(test, opt, fid);\n+\t\tif (ret != 0)\n+\t\t\tgoto error;\n+\t}\n+\n+\t/* launch inference requests */\n+\tret = ml_inference_launch_cores(test, opt, 0, opt->nb_filelist - 1);\n+\tif (ret != 0) {\n+\t\tml_err(\"failed to launch cores\");\n+\t\tgoto error;\n+\t}\n+\n+\trte_eal_mp_wait_lcore();\n+\n+\t/* stop and unload all models */\n+\tfor (fid = 0; fid < opt->nb_filelist; fid++) {\n+\t\tret = ml_inference_result(test, opt, fid);\n+\t\tif (ret != ML_TEST_SUCCESS)\n+\t\t\tgoto error;\n+\n+\t\tml_inference_iomem_destroy(test, opt, fid);\n+\n+\t\tret = ml_model_stop(test, opt, &t->model[fid], fid);\n+\t\tif (ret != 0)\n+\t\t\tgoto error;\n+\n+\t\tret = ml_model_unload(test, opt, &t->model[fid], fid);\n+\t\tif (ret != 0)\n+\t\t\tgoto error;\n+\t}\n+\n+\tml_inference_mem_destroy(test, opt);\n+\n+\tret = ml_inference_mldev_destroy(test, opt);\n+\tif (ret != 0)\n+\t\treturn ret;\n+\n+\tt->cmn.result = ML_TEST_SUCCESS;\n+\n+\treturn 0;\n+\n+error:\n+\tml_inference_mem_destroy(test, opt);\n+\tfor (fid = 0; fid < opt->nb_filelist; fid++) {\n+\t\tml_inference_iomem_destroy(test, opt, fid);\n+\t\tml_model_stop(test, opt, &t->model[fid], fid);\n+\t\tml_model_unload(test, opt, &t->model[fid], fid);\n+\t}\n+\n+\tt->cmn.result = ML_TEST_FAILED;\n+\n+\treturn ret;\n+}\n+\n+static int\n+test_inference_interleave_result(struct ml_test *test, struct ml_options *opt)\n+{\n+\tstruct test_inference *t;\n+\n+\tRTE_SET_USED(opt);\n+\n+\tt = ml_test_priv(test);\n+\n+\treturn t->cmn.result;\n+}\n+\n+static const struct ml_test_ops inference_interleave = {\n+\t.cap_check = test_inference_cap_check,\n+\t.opt_check = test_inference_opt_check,\n+\t.opt_dump = test_inference_opt_dump,\n+\t.test_setup = test_inference_setup,\n+\t.test_destroy = test_inference_destroy,\n+\t.test_driver = test_inference_interleave_driver,\n+\t.test_result = test_inference_interleave_result,\n+};\n+\n+ML_TEST_REGISTER(inference_interleave);\n",
    "prefixes": [
        "v2",
        "06/12"
    ]
}