get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 130902,
    "url": "http://patches.dpdk.org/api/patches/130902/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230830155927.3566-20-syalavarthi@marvell.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": "<20230830155927.3566-20-syalavarthi@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230830155927.3566-20-syalavarthi@marvell.com",
    "date": "2023-08-30T15:59:09",
    "name": "[v1,19/34] ml/cnxk: support config and close of tvmdp library",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b64bf4366056d56faffe8f32af3acd2baef3ac23",
    "submitter": {
        "id": 2480,
        "url": "http://patches.dpdk.org/api/people/2480/?format=api",
        "name": "Srikanth Yalavarthi",
        "email": "syalavarthi@marvell.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/20230830155927.3566-20-syalavarthi@marvell.com/mbox/",
    "series": [
        {
            "id": 29376,
            "url": "http://patches.dpdk.org/api/series/29376/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29376",
            "date": "2023-08-30T15:58:50",
            "name": "Implemenation of revised ml/cnxk driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/29376/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/130902/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/130902/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 B990841FD1;\n\tWed, 30 Aug 2023 18:04:18 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6F72F40E96;\n\tWed, 30 Aug 2023 18:00:03 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 41C8D402AE\n for <dev@dpdk.org>; Wed, 30 Aug 2023 17:59:42 +0200 (CEST)",
            "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 37U6P93O004408 for <dev@dpdk.org>; Wed, 30 Aug 2023 08:59:41 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3st0fysstm-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 30 Aug 2023 08:59:41 -0700",
            "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.48;\n Wed, 30 Aug 2023 08:59:38 -0700",
            "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.48 via Frontend\n Transport; Wed, 30 Aug 2023 08:59:38 -0700",
            "from ml-host-33.caveonetworks.com (unknown [10.110.143.233])\n by maili.marvell.com (Postfix) with ESMTP id 535BE3F707F;\n Wed, 30 Aug 2023 08:59:38 -0700 (PDT)"
        ],
        "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-transfer-encoding : content-type; s=pfpt0220;\n bh=DGSs8MbByPyhTcKHN/9qsDopr4or0e4onim1/rCXtzk=;\n b=M6zPUGOyWCF3NUMTJv4l0fUPweb0Whzc3aFn8SVPUNY5tAzc6zlV05Y9JYJbzh3CilI9\n rieOzfhShCfRVy3xOtUIpbTH/vMfKjlVUOUGEVDd+P7CuIznruZiP7W7nAQcCbP8eCQx\n lW0Edak7JhdsCE1VK55Oj0JOwyuRyM9qesaPklce2GrVL+rjw+3siz7aQILllfKMz9F+\n ARL7K5hC0M7DQ+6gBRH/hY88mM7ghvNs87BPmh33ysyXUtbwK/kM5Uq2vxCNsWlbiNnQ\n g2CTpqEOXNMfyuphU1P6CAfPspS1Z6CCG8wjxXMZwWBe/lUnMFOhVbyuD27cDCoNYpX7 Cw==",
        "From": "Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "To": "Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "CC": "<dev@dpdk.org>, <sshankarnara@marvell.com>, <aprabhu@marvell.com>,\n <ptakkar@marvell.com>",
        "Subject": "[PATCH v1 19/34] ml/cnxk: support config and close of tvmdp library",
        "Date": "Wed, 30 Aug 2023 08:59:09 -0700",
        "Message-ID": "<20230830155927.3566-20-syalavarthi@marvell.com>",
        "X-Mailer": "git-send-email 2.41.0",
        "In-Reply-To": "<20230830155927.3566-1-syalavarthi@marvell.com>",
        "References": "<20230830155927.3566-1-syalavarthi@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "JsRLh8OZ4bD44_jbg5sW366pwVyUhR_V",
        "X-Proofpoint-ORIG-GUID": "JsRLh8OZ4bD44_jbg5sW366pwVyUhR_V",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26\n definitions=2023-08-30_12,2023-08-29_01,2023-05-22_02",
        "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 support to configure and close TVMDP library based\non ML device configuration options.\n\nUpdated meson build to enable Jansson, TVM runtime, TVMDP\nlibrary as build dependencies.\n\nSigned-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>\n---\n drivers/ml/cnxk/cnxk_ml_ops.c  | 15 ++++++++++++\n drivers/ml/cnxk/meson.build    | 45 ++++++++++++++++++++++++++++++++++\n drivers/ml/cnxk/mvtvm_ml_ops.c | 44 +++++++++++++++++++++++++++++++++\n drivers/ml/cnxk/mvtvm_ml_ops.h | 15 ++++++++++++\n 4 files changed, 119 insertions(+)\n create mode 100644 drivers/ml/cnxk/mvtvm_ml_ops.c\n create mode 100644 drivers/ml/cnxk/mvtvm_ml_ops.h",
    "diff": "diff --git a/drivers/ml/cnxk/cnxk_ml_ops.c b/drivers/ml/cnxk/cnxk_ml_ops.c\nindex b2eb4bd0d9a..454fec33234 100644\n--- a/drivers/ml/cnxk/cnxk_ml_ops.c\n+++ b/drivers/ml/cnxk/cnxk_ml_ops.c\n@@ -9,6 +9,10 @@\n \n #include \"cn10k_ml_ops.h\"\n \n+#ifdef RTE_MLDEV_CNXK_ENABLE_MVTVM\n+#include \"mvtvm_ml_ops.h\"\n+#endif\n+\n #include \"cnxk_ml_dev.h\"\n #include \"cnxk_ml_io.h\"\n #include \"cnxk_ml_model.h\"\n@@ -625,6 +629,12 @@ cnxk_ml_dev_configure(struct rte_ml_dev *dev, const struct rte_ml_dev_config *co\n \t\tgoto error;\n \t}\n \n+#ifdef RTE_MLDEV_CNXK_ENABLE_MVTVM\n+\tret = mvtvm_ml_dev_configure(cnxk_mldev, conf);\n+\tif (ret != 0)\n+\t\tgoto error;\n+#endif\n+\n \t/* Set device capabilities */\n \tcnxk_mldev->max_nb_layers =\n \t\tcnxk_mldev->cn10k_mldev.fw.req->cn10k_req.jd.fw_load.cap.s.max_models;\n@@ -685,6 +695,11 @@ cnxk_ml_dev_close(struct rte_ml_dev *dev)\n \t/* Un-initialize xstats */\n \tcnxk_ml_xstats_uninit(cnxk_mldev);\n \n+#ifdef RTE_MLDEV_CNXK_ENABLE_MVTVM\n+\tif (mvtvm_ml_dev_close(cnxk_mldev) != 0)\n+\t\tplt_err(\"Failed to close MVTVM ML Device\");\n+#endif\n+\n \tif (cn10k_ml_dev_close(cnxk_mldev) != 0)\n \t\tplt_err(\"Failed to close CN10K ML Device\");\n \ndiff --git a/drivers/ml/cnxk/meson.build b/drivers/ml/cnxk/meson.build\nindex 575f08f9c09..29dad0b0e33 100644\n--- a/drivers/ml/cnxk/meson.build\n+++ b/drivers/ml/cnxk/meson.build\n@@ -7,6 +7,27 @@ if not is_linux or not dpdk_conf.get('RTE_ARCH_64')\n     subdir_done()\n endif\n \n+enable_mvtvm = true\n+\n+if not jansson_dep.found()\n+        message('drivers/ml/cnxk: jansson not found')\n+        enable_mvtvm = false\n+endif\n+\n+tvmrt_lib = cc.find_library('tvm_runtime', required: false)\n+if tvmrt_lib.found()\n+        tvmrt_dep = declare_dependency(dependencies: tvmrt_lib)\n+else\n+        message('drivers/ml/cnxk: tvm_runtime not found')\n+        enable_mvtvm = false\n+endif\n+\n+tvmdp_dep = dependency('tvmdp', required: false)\n+if not tvmdp_dep.found()\n+        message('drivers/ml/cnxk: tvmdp not found')\n+        enable_mvtvm = false\n+endif\n+\n driver_sdk_headers = files(\n         'cn10k_ml_dev.h',\n         'cn10k_ml_ops.h',\n@@ -34,6 +55,30 @@ sources = files(\n \n deps += ['mldev', 'common_cnxk', 'kvargs', 'hash']\n \n+if enable_mvtvm\n+\n+dpdk_conf.set('RTE_MLDEV_CNXK_ENABLE_MVTVM', true)\n+\n+driver_sdk_headers += files(\n+        'mvtvm_ml_ops.h',\n+)\n+\n+sources += files(\n+        'mvtvm_ml_ops.c',\n+)\n+\n+ext_deps += tvmrt_dep\n+ext_deps += tvmdp_dep\n+ext_deps += cc.find_library('stdc++', required: true)\n+ext_deps += jansson_dep\n+\n+deps += ['bus_vdev']\n+\n+message('drivers/ml/cnxk: Enabled TVM model support')\n+else\n+message('drivers/ml/cnxk: Disabled TVM model support')\n+endif\n+\n require_iova_in_mbuf = false\n \n if get_option('buildtype').contains('debug')\ndiff --git a/drivers/ml/cnxk/mvtvm_ml_ops.c b/drivers/ml/cnxk/mvtvm_ml_ops.c\nnew file mode 100644\nindex 00000000000..0e1fc527daa\n--- /dev/null\n+++ b/drivers/ml/cnxk/mvtvm_ml_ops.c\n@@ -0,0 +1,44 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2023 Marvell.\n+ */\n+\n+#include <tvmdp.h>\n+\n+#include <rte_common.h>\n+#include <rte_cycles.h>\n+#include <rte_mldev.h>\n+#include <rte_mldev_pmd.h>\n+\n+#include \"mvtvm_ml_ops.h\"\n+\n+#include \"cnxk_ml_dev.h\"\n+\n+int\n+mvtvm_ml_dev_configure(struct cnxk_ml_dev *cnxk_mldev, const struct rte_ml_dev_config *conf)\n+{\n+\tint ret;\n+\n+\tRTE_SET_USED(conf);\n+\n+\t/* Configure TVMDP library */\n+\tret = tvmdp_configure(cnxk_mldev->mldev->data->nb_models, rte_get_tsc_cycles);\n+\tif (ret != 0)\n+\t\tplt_err(\"TVMDP configuration failed, error = %d\\n\", ret);\n+\n+\treturn ret;\n+}\n+\n+int\n+mvtvm_ml_dev_close(struct cnxk_ml_dev *cnxk_mldev)\n+{\n+\tint ret;\n+\n+\tRTE_SET_USED(cnxk_mldev);\n+\n+\t/* Close TVMDP library configuration */\n+\tret = tvmdp_close();\n+\tif (ret != 0)\n+\t\tplt_err(\"TVMDP close failed, error = %d\\n\", ret);\n+\n+\treturn ret;\n+}\ndiff --git a/drivers/ml/cnxk/mvtvm_ml_ops.h b/drivers/ml/cnxk/mvtvm_ml_ops.h\nnew file mode 100644\nindex 00000000000..988f3a1fd5e\n--- /dev/null\n+++ b/drivers/ml/cnxk/mvtvm_ml_ops.h\n@@ -0,0 +1,15 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2023 Marvell.\n+ */\n+\n+#ifndef _MVTVM_ML_OPS_H_\n+#define _MVTVM_ML_OPS_H_\n+\n+#include <rte_mldev.h>\n+\n+struct cnxk_ml_dev;\n+\n+int mvtvm_ml_dev_configure(struct cnxk_ml_dev *cnxk_mldev, const struct rte_ml_dev_config *conf);\n+int mvtvm_ml_dev_close(struct cnxk_ml_dev *cnxk_mldev);\n+\n+#endif /* _MVTVM_ML_OPS_H_ */\n",
    "prefixes": [
        "v1",
        "19/34"
    ]
}