get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 120596,
    "url": "http://patchwork.dpdk.org/api/patches/120596/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20221208193532.16718-2-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": "<20221208193532.16718-2-syalavarthi@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221208193532.16718-2-syalavarthi@marvell.com",
    "date": "2022-12-08T19:35:29",
    "name": "[v1,1/4] common/ml: add initial files for ML common code",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6160917db7c117835153c56e3732a58be58a87ca",
    "submitter": {
        "id": 2480,
        "url": "http://patchwork.dpdk.org/api/people/2480/?format=api",
        "name": "Srikanth Yalavarthi",
        "email": "syalavarthi@marvell.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/20221208193532.16718-2-syalavarthi@marvell.com/mbox/",
    "series": [
        {
            "id": 26047,
            "url": "http://patchwork.dpdk.org/api/series/26047/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=26047",
            "date": "2022-12-08T19:35:28",
            "name": "implementation of ML common code",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/26047/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/120596/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/120596/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 EFF21A0032;\n\tThu,  8 Dec 2022 20:35:43 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 061CE42D20;\n\tThu,  8 Dec 2022 20:35:40 +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 3BDCB4003F\n for <dev@dpdk.org>; Thu,  8 Dec 2022 20:35:38 +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 2B8J8KK7001363; Thu, 8 Dec 2022 11:35:37 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3mb22svkjj-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 08 Dec 2022 11:35:37 -0800",
            "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.2;\n Thu, 8 Dec 2022 11:35:35 -0800",
            "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.18 via Frontend\n Transport; Thu, 8 Dec 2022 11:35:35 -0800",
            "from ml-host-33.caveonetworks.com (unknown [10.110.143.233])\n by maili.marvell.com (Postfix) with ESMTP id 30C553F7066;\n Thu,  8 Dec 2022 11:35:35 -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=1y3WPsisNh4t07H03WKBH2dZlrXQVhGoWJ6xFz51WU4=;\n b=aLkPxIUmrDlsxGgE82+bTXEzHgcOAhsgHm9j4yOSez3oXjEk0tEVK919z75rI3zaRA36\n 5JhihEwZJDiaz6/PE2ztqEwOi30TyMM9zevl50WP07MOFd2SnnklFKm7iNbLU/VPyYQe\n Z53PYaFFyG0LYXSu1gBmrwZxqzqwsOX2W9oC2ddaJ49GzHkwIxOXQflXuf3ah1LxCuFP\n 17MH6TUqjsr1wu6ytxF8cInaezIkOUioi6CWWICyrWZRgO7DglwhgUvd3bmyW3VvOPKN\n TbxkCllQFZOi6PPoVjE9X75TNkz8g6cdfcadRB+X3o1Z6iAnrREiJAJzI6x6vZRCSJXJ AQ==",
        "From": "Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "To": "Thomas Monjalon <thomas@monjalon.net>, Srikanth Yalavarthi\n <syalavarthi@marvell.com>",
        "CC": "<dev@dpdk.org>, <sshankarnara@marvell.com>, <jerinj@marvell.com>,\n <aprabhu@marvell.com>",
        "Subject": "[PATCH v1 1/4] common/ml: add initial files for ML common code",
        "Date": "Thu, 8 Dec 2022 11:35:29 -0800",
        "Message-ID": "<20221208193532.16718-2-syalavarthi@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20221208193532.16718-1-syalavarthi@marvell.com>",
        "References": "<20221208193532.16718-1-syalavarthi@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "4jt1QvDG_IT20M5RHyn4EG0sjFSUXwf0",
        "X-Proofpoint-GUID": "4jt1QvDG_IT20M5RHyn4EG0sjFSUXwf0",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1\n definitions=2022-12-08_11,2022-12-08_01,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 initial files for common ML driver code. Implemented ML\ntype to size conversion, type to string and format to string\nconversion utility functions.\n\nSigned-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>\n---\nDepends-on: series-26046 (\"app/mldev: implement test framework for mldev\")\n\n MAINTAINERS                   |   8 +++\n drivers/common/meson.build    |   1 +\n drivers/common/ml/meson.build |  20 +++++++\n drivers/common/ml/ml_utils.c  | 110 ++++++++++++++++++++++++++++++++++\n drivers/common/ml/ml_utils.h  |  50 ++++++++++++++++\n drivers/common/ml/version.map |   9 +++\n 6 files changed, 198 insertions(+)\n create mode 100644 drivers/common/ml/meson.build\n create mode 100644 drivers/common/ml/ml_utils.c\n create mode 100644 drivers/common/ml/ml_utils.h\n create mode 100644 drivers/common/ml/version.map\n\n--\n2.17.1",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 5fa276fafa..6412209bff 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -1431,6 +1431,14 @@ F: drivers/raw/dpaa2_cmdif/\n F: doc/guides/rawdevs/dpaa2_cmdif.rst\n\n\n+ML Device Drivers\n+------------------------\n+\n+ML common code\n+M: Srikanth Yalavarthi <syalavarthi@marvell.com>\n+F: drivers/common/ml/\n+\n+\n Packet processing\n -----------------\n\ndiff --git a/drivers/common/meson.build b/drivers/common/meson.build\nindex b63d899d50..0878dde0a0 100644\n--- a/drivers/common/meson.build\n+++ b/drivers/common/meson.build\n@@ -9,4 +9,5 @@ drivers = [\n         'idpf',\n         'mvep',\n         'octeontx',\n+        'ml',\n ]\ndiff --git a/drivers/common/ml/meson.build b/drivers/common/ml/meson.build\nnew file mode 100644\nindex 0000000000..2749ab6c2e\n--- /dev/null\n+++ b/drivers/common/ml/meson.build\n@@ -0,0 +1,20 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (c) 2022 Marvell.\n+\n+if not is_linux or not dpdk_conf.get('RTE_ARCH_64')\n+    build = false\n+    reason = 'only supported on 64-bit Linux'\n+    subdir_done()\n+endif\n+\n+headers = files(\n+        'ml_utils.h',\n+)\n+\n+sources = files(\n+        'ml_utils.c',\n+)\n+\n+deps += ['mldev']\n+\n+pmd_supports_disable_iova_as_pa = true\ndiff --git a/drivers/common/ml/ml_utils.c b/drivers/common/ml/ml_utils.c\nnew file mode 100644\nindex 0000000000..45c1f76a54\n--- /dev/null\n+++ b/drivers/common/ml/ml_utils.c\n@@ -0,0 +1,110 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2022 Marvell.\n+ */\n+\n+#include <rte_mldev.h>\n+\n+#include \"ml_utils.h\"\n+\n+int\n+ml_io_type_size_get(enum rte_ml_io_type type)\n+{\n+\tswitch (type) {\n+\tcase RTE_ML_IO_TYPE_UNKNOWN:\n+\t\treturn -EINVAL;\n+\tcase RTE_ML_IO_TYPE_INT8:\n+\t\treturn sizeof(int8_t);\n+\tcase RTE_ML_IO_TYPE_UINT8:\n+\t\treturn sizeof(uint8_t);\n+\tcase RTE_ML_IO_TYPE_INT16:\n+\t\treturn sizeof(int16_t);\n+\tcase RTE_ML_IO_TYPE_UINT16:\n+\t\treturn sizeof(uint16_t);\n+\tcase RTE_ML_IO_TYPE_INT32:\n+\t\treturn sizeof(int32_t);\n+\tcase RTE_ML_IO_TYPE_UINT32:\n+\t\treturn sizeof(uint32_t);\n+\tcase RTE_ML_IO_TYPE_FP8:\n+\t\treturn sizeof(uint8_t);\n+\tcase RTE_ML_IO_TYPE_FP16:\n+\t\treturn sizeof(uint8_t) * 2;\n+\tcase RTE_ML_IO_TYPE_FP32:\n+\t\treturn sizeof(uint8_t) * 4;\n+\tcase RTE_ML_IO_TYPE_BFLOAT16:\n+\t\treturn sizeof(uint8_t) * 2;\n+\tdefault:\n+\t\treturn -EINVAL;\n+\t}\n+}\n+\n+void\n+ml_io_type_to_str(enum rte_ml_io_type type, char *str, int len)\n+{\n+\tswitch (type) {\n+\tcase RTE_ML_IO_TYPE_UNKNOWN:\n+\t\trte_strlcpy(str, \"unknown\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_TYPE_INT8:\n+\t\trte_strlcpy(str, \"int8\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_TYPE_UINT8:\n+\t\trte_strlcpy(str, \"uint8\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_TYPE_INT16:\n+\t\trte_strlcpy(str, \"int16\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_TYPE_UINT16:\n+\t\trte_strlcpy(str, \"uint16\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_TYPE_INT32:\n+\t\trte_strlcpy(str, \"int32\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_TYPE_UINT32:\n+\t\trte_strlcpy(str, \"uint32\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_TYPE_FP8:\n+\t\trte_strlcpy(str, \"float8\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_TYPE_FP16:\n+\t\trte_strlcpy(str, \"float16\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_TYPE_FP32:\n+\t\trte_strlcpy(str, \"float32\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_TYPE_BFLOAT16:\n+\t\trte_strlcpy(str, \"bfloat16\", len);\n+\t\tbreak;\n+\tdefault:\n+\t\trte_strlcpy(str, \"invalid\", len);\n+\t}\n+}\n+\n+void\n+ml_io_format_to_str(enum rte_ml_io_format format, char *str, int len)\n+{\n+\tswitch (format) {\n+\tcase RTE_ML_IO_FORMAT_NCHW:\n+\t\trte_strlcpy(str, \"NCHW\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_FORMAT_NHWC:\n+\t\trte_strlcpy(str, \"NHWC\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_FORMAT_CHWN:\n+\t\trte_strlcpy(str, \"CHWN\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_FORMAT_3D:\n+\t\trte_strlcpy(str, \"3D\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_FORMAT_2D:\n+\t\trte_strlcpy(str, \"Matrix\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_FORMAT_1D:\n+\t\trte_strlcpy(str, \"Vector\", len);\n+\t\tbreak;\n+\tcase RTE_ML_IO_FORMAT_SCALAR:\n+\t\trte_strlcpy(str, \"Scalar\", len);\n+\t\tbreak;\n+\tdefault:\n+\t\trte_strlcpy(str, \"invalid\", len);\n+\t}\n+}\ndiff --git a/drivers/common/ml/ml_utils.h b/drivers/common/ml/ml_utils.h\nnew file mode 100644\nindex 0000000000..b6adb98e04\n--- /dev/null\n+++ b/drivers/common/ml/ml_utils.h\n@@ -0,0 +1,50 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2022 Marvell.\n+ */\n+\n+#ifndef _ML_UTILS_H_\n+#define _ML_UTILS_H_\n+\n+#include <rte_compat.h>\n+#include <rte_mldev.h>\n+\n+/**\n+ * Get the size an ML IO type in bytes.\n+ *\n+ * @param[in] type\n+ *\tEnumeration of ML IO data type.\n+ *\n+ * @return\n+ *\t- > 0, Size of the data type in bytes.\n+ *\t- < 0, Error code on failure.\n+ */\n+__rte_internal\n+int ml_io_type_size_get(enum rte_ml_io_type type);\n+\n+/**\n+ * Get the name of an ML IO type.\n+ *\n+ * @param[in] type\n+ *\tEnumeration of ML IO data type.\n+ * @param[in] str\n+ *\tAddress of character array.\n+ * @param[in] len\n+ *\tLength of character array.\n+ */\n+__rte_internal\n+void ml_io_type_to_str(enum rte_ml_io_type type, char *str, int len);\n+\n+/**\n+ * Get the name of an ML IO format.\n+ *\n+ * @param[in] type\n+ *\tEnumeration of ML IO format.\n+ * @param[in] str\n+ *\tAddress of character array.\n+ * @param[in] len\n+ *\tLength of character array.\n+ */\n+__rte_internal\n+void ml_io_format_to_str(enum rte_ml_io_format format, char *str, int len);\n+\n+#endif /*_ML_UTILS_H_ */\ndiff --git a/drivers/common/ml/version.map b/drivers/common/ml/version.map\nnew file mode 100644\nindex 0000000000..7e33755f2f\n--- /dev/null\n+++ b/drivers/common/ml/version.map\n@@ -0,0 +1,9 @@\n+INTERNAL {\n+\tglobal:\n+\n+\tml_io_type_size_get;\n+\tml_io_type_to_str;\n+\tml_io_format_to_str;\n+\n+\tlocal: *;\n+};\n",
    "prefixes": [
        "v1",
        "1/4"
    ]
}