get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 131702,
    "url": "http://patchwork.dpdk.org/api/patches/131702/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230920072528.14185-29-syalavarthi@marvell.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": "<20230920072528.14185-29-syalavarthi@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230920072528.14185-29-syalavarthi@marvell.com",
    "date": "2023-09-20T07:25:19",
    "name": "[v2,28/34] ml/cnxk: support device dump for TVM models",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "9677fe3f087155e09ef554d5770e3bc62f101e5c",
    "submitter": {
        "id": 2480,
        "url": "http://patchwork.dpdk.org/api/people/2480/?format=api",
        "name": "Srikanth Yalavarthi",
        "email": "syalavarthi@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patchwork.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230920072528.14185-29-syalavarthi@marvell.com/mbox/",
    "series": [
        {
            "id": 29567,
            "url": "http://patchwork.dpdk.org/api/series/29567/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29567",
            "date": "2023-09-20T07:24:51",
            "name": "Implemenation of revised ml/cnxk driver",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/29567/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/131702/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/131702/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 C64B9425E4;\n\tWed, 20 Sep 2023 09:28:43 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EEF3442DC0;\n\tWed, 20 Sep 2023 09:26:09 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id F1455410D5\n for <dev@dpdk.org>; Wed, 20 Sep 2023 09:25:43 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 38K7JQqP009223 for <dev@dpdk.org>; Wed, 20 Sep 2023 00:25:43 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3t7htasym8-3\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 20 Sep 2023 00:25:43 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Wed, 20 Sep 2023 00:25:41 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Wed, 20 Sep 2023 00:25:41 -0700",
            "from ml-host-33.caveonetworks.com (unknown [10.110.143.233])\n by maili.marvell.com (Postfix) with ESMTP id 3248D5B6928;\n Wed, 20 Sep 2023 00:25:41 -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=zjEs3piPKsQNyiO8DxNPHmWrSsjksx9mMU+vYgB/VYw=;\n b=jgF4B9qQdKV+9Y3OoK6LcrcyuBi/7mILDPcQxMZMFurVyi8Go8+AuvnjXPOB9HigrkJ/\n U12gWnqH3XXSqOmyaTRrIGpntrxFhtm2cp1Ybwh8RKlfthOfw2Mew/unA/4IfLCQhewN\n ZVfJ4G730TaM6vKIR995Vp1lpK8aYan6/rzMoj1yIJHZC9n8jVUJxk3rMXbCeacnClUE\n doT7KurlYb+zOC4jJE8cGQBeaR3WmcPjAZNEO+zSpqJVMBCgxIXScsxP7b/JJwwH6ZvI\n 0XlM1IY/mjDkAMuTfzW3rYrdJz2yNEkYgCwHNapg/dl7ECx9d2FjqpVq+KF/pvgNtgor tg==",
        "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 v2 28/34] ml/cnxk: support device dump for TVM models",
        "Date": "Wed, 20 Sep 2023 00:25:19 -0700",
        "Message-ID": "<20230920072528.14185-29-syalavarthi@marvell.com>",
        "X-Mailer": "git-send-email 2.41.0",
        "In-Reply-To": "<20230920072528.14185-1-syalavarthi@marvell.com>",
        "References": "<20230830155927.3566-1-syalavarthi@marvell.com>\n <20230920072528.14185-1-syalavarthi@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "o58Bz9RacJJe0jPYuv1R_OCXxwPppJ2w",
        "X-Proofpoint-GUID": "o58Bz9RacJJe0jPYuv1R_OCXxwPppJ2w",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26\n definitions=2023-09-20_02,2023-09-19_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": "Enabled support to print TVM model layer info.\n\nSigned-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>\n---\n drivers/ml/cnxk/cnxk_ml_model.c  |  9 ++++-\n drivers/ml/cnxk/cnxk_ml_ops.c    |  1 +\n drivers/ml/cnxk/mvtvm_ml_model.c | 59 ++++++++++++++++++++++++++++++++\n drivers/ml/cnxk/mvtvm_ml_model.h |  2 ++\n 4 files changed, 70 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/ml/cnxk/cnxk_ml_model.c b/drivers/ml/cnxk/cnxk_ml_model.c\nindex 746d3ca5a9..e63ee58ab2 100644\n--- a/drivers/ml/cnxk/cnxk_ml_model.c\n+++ b/drivers/ml/cnxk/cnxk_ml_model.c\n@@ -115,6 +115,8 @@ cnxk_ml_model_dump(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *model,\n \tcnxk_ml_print_line(fp, LINE_LEN);\n \tfprintf(fp, \"%*s : %u\\n\", FIELD_LEN, \"model_id\", model->model_id);\n \tfprintf(fp, \"%*s : %s\\n\", FIELD_LEN, \"name\", model->name);\n+\tfprintf(fp, \"%*s : %d\\n\", FIELD_LEN, \"type\", model->type);\n+\tfprintf(fp, \"%*s : %d\\n\", FIELD_LEN, \"subtype\", model->subtype);\n \tfprintf(fp, \"%*s : 0x%016lx\\n\", FIELD_LEN, \"model\", PLT_U64_CAST(model));\n \tfprintf(fp, \"%*s : %u\\n\", FIELD_LEN, \"batch_size\", model->batch_size);\n \tfprintf(fp, \"%*s : %u\\n\", FIELD_LEN, \"nb_layers\", model->nb_layers);\n@@ -131,6 +133,11 @@ cnxk_ml_model_dump(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *model,\n \n \tfor (layer_id = 0; layer_id < model->nb_layers; layer_id++) {\n \t\tlayer = &model->layer[layer_id];\n-\t\tcn10k_ml_layer_print(cnxk_mldev, layer, fp);\n+\t\tif (layer->type == ML_CNXK_LAYER_TYPE_MRVL)\n+\t\t\tcn10k_ml_layer_print(cnxk_mldev, layer, fp);\n+#ifdef RTE_MLDEV_CNXK_ENABLE_MVTVM\n+\t\telse\n+\t\t\tmvtvm_ml_layer_print(cnxk_mldev, layer, fp);\n+#endif\n \t}\n }\ndiff --git a/drivers/ml/cnxk/cnxk_ml_ops.c b/drivers/ml/cnxk/cnxk_ml_ops.c\nindex 1e567ad45c..361184620b 100644\n--- a/drivers/ml/cnxk/cnxk_ml_ops.c\n+++ b/drivers/ml/cnxk/cnxk_ml_ops.c\n@@ -18,6 +18,7 @@\n #include \"cnxk_ml_io.h\"\n #include \"cnxk_ml_model.h\"\n #include \"cnxk_ml_ops.h\"\n+#include \"cnxk_ml_utils.h\"\n \n /* ML model macros */\n #define CNXK_ML_MODEL_MEMZONE_NAME \"ml_cnxk_model_mz\"\ndiff --git a/drivers/ml/cnxk/mvtvm_ml_model.c b/drivers/ml/cnxk/mvtvm_ml_model.c\nindex 8c04d4652f..7086c7a407 100644\n--- a/drivers/ml/cnxk/mvtvm_ml_model.c\n+++ b/drivers/ml/cnxk/mvtvm_ml_model.c\n@@ -15,6 +15,7 @@\n \n #include \"cnxk_ml_dev.h\"\n #include \"cnxk_ml_model.h\"\n+#include \"cnxk_ml_utils.h\"\n \n /* Objects list */\n char mvtvm_object_list[ML_MVTVM_MODEL_OBJECT_MAX][RTE_ML_STR_MAX] = {\"mod.so\", \"mod.json\",\n@@ -241,3 +242,61 @@ mvtvm_ml_model_info_set(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *mo\n \tcn10k_ml_model_info_set(cnxk_mldev, model, &model->mvtvm.info,\n \t\t\t\t&model->layer[0].glow.metadata);\n }\n+\n+void\n+mvtvm_ml_layer_print(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_layer *layer, FILE *fp)\n+{\n+\tchar str[STR_LEN];\n+\tuint8_t i;\n+\n+\t/* Print debug info */\n+\tcnxk_ml_print_line(fp, LINE_LEN);\n+\tfprintf(fp, \" Layer Information (Layer ID: %u, Name: %s)\\n\",\n+\t\tcnxk_mldev->index_map[layer->index].layer_id, layer->name);\n+\tcnxk_ml_print_line(fp, LINE_LEN);\n+\tfprintf(fp, \"%*s : %u\\n\", FIELD_LEN, \"layer_id\",\n+\t\tcnxk_mldev->index_map[layer->index].layer_id);\n+\tfprintf(fp, \"%*s : %s\\n\", FIELD_LEN, \"name\", layer->name);\n+\tfprintf(fp, \"%*s : %d\\n\", FIELD_LEN, \"type\", layer->type);\n+\tfprintf(fp, \"%*s : 0x%016lx\\n\", FIELD_LEN, \"layer\", PLT_U64_CAST(layer));\n+\tfprintf(fp, \"%*s : %u\\n\", FIELD_LEN, \"batch_size\", layer->batch_size);\n+\n+\t/* Print model state */\n+\tif (layer->state == ML_CNXK_LAYER_STATE_LOADED)\n+\t\tfprintf(fp, \"%*s : %s\\n\", FIELD_LEN, \"state\", \"loaded\");\n+\tif (layer->state == ML_CNXK_LAYER_STATE_JOB_ACTIVE)\n+\t\tfprintf(fp, \"%*s : %s\\n\", FIELD_LEN, \"state\", \"job_active\");\n+\tif (layer->state == ML_CNXK_LAYER_STATE_STARTED)\n+\t\tfprintf(fp, \"%*s : %s\\n\", FIELD_LEN, \"state\", \"started\");\n+\n+\tfprintf(fp, \"%*s : %u\\n\", FIELD_LEN, \"num_inputs\", layer->info.nb_inputs);\n+\tfprintf(fp, \"%*s : %u\\n\", FIELD_LEN, \"num_outputs\", layer->info.nb_outputs);\n+\tfprintf(fp, \"\\n\");\n+\n+\tcnxk_ml_print_line(fp, LINE_LEN);\n+\tfprintf(fp, \"%8s  %16s  %12s\\n\", \"input\", \"input_name\", \"input_type\");\n+\tcnxk_ml_print_line(fp, LINE_LEN);\n+\tfor (i = 0; i < layer->info.nb_inputs; i++) {\n+\t\tfprintf(fp, \"%8u  \", i);\n+\t\tfprintf(fp, \"%*s  \", 16, layer->info.input[i].name);\n+\t\trte_ml_io_type_to_str(layer->info.input[i].qtype, str, STR_LEN);\n+\t\tfprintf(fp, \"%*s  \", 12, str);\n+\t}\n+\tfprintf(fp, \"\\n\");\n+\tcnxk_ml_print_line(fp, LINE_LEN);\n+\tfprintf(fp, \"\\n\");\n+\n+\tcnxk_ml_print_line(fp, LINE_LEN);\n+\tfprintf(fp, \"%8s  %16s  %12s\\n\", \"output\", \"output_name\", \"output_type\");\n+\tcnxk_ml_print_line(fp, LINE_LEN);\n+\tfor (i = 0; i < layer->info.nb_outputs; i++) {\n+\t\tfprintf(fp, \"%8u  \", i);\n+\t\tfprintf(fp, \"%*s  \", 16, layer->info.output[i].name);\n+\t\trte_ml_io_type_to_str(layer->info.output[i].qtype, str, STR_LEN);\n+\t\tfprintf(fp, \"%*s  \", 12, str);\n+\t\tfprintf(fp, \"\\n\");\n+\t}\n+\tfprintf(fp, \"\\n\");\n+\tcnxk_ml_print_line(fp, LINE_LEN);\n+\tfprintf(fp, \"\\n\");\n+}\ndiff --git a/drivers/ml/cnxk/mvtvm_ml_model.h b/drivers/ml/cnxk/mvtvm_ml_model.h\nindex eef424b5c2..fa7735cfaa 100644\n--- a/drivers/ml/cnxk/mvtvm_ml_model.h\n+++ b/drivers/ml/cnxk/mvtvm_ml_model.h\n@@ -13,6 +13,7 @@\n \n struct cnxk_ml_dev;\n struct cnxk_ml_model;\n+struct cnxk_ml_layer;\n \n /* Maximum number of objects per model */\n #define ML_MVTVM_MODEL_OBJECT_MAX 3\n@@ -50,5 +51,6 @@ int mvtvm_ml_model_blob_parse(struct rte_ml_model_params *params,\n \t\t\t      struct mvtvm_ml_model_object *object);\n void mvtvm_ml_model_io_info_update(struct cnxk_ml_model *model);\n void mvtvm_ml_model_info_set(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *model);\n+void mvtvm_ml_layer_print(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_layer *layer, FILE *fp);\n \n #endif /* _MVTVM_ML_MODEL_H_ */\n",
    "prefixes": [
        "v2",
        "28/34"
    ]
}