Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/126430/?format=api
http://patchwork.dpdk.org/api/patches/126430/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230423051403.31971-3-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": "<20230423051403.31971-3-syalavarthi@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230423051403.31971-3-syalavarthi@marvell.com", "date": "2023-04-23T05:14:00", "name": "[v1,2/5] mldev: introduce revised xstats", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "b69bd6c16c8888bea43a12eaf9459b7b8f9752c9", "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/20230423051403.31971-3-syalavarthi@marvell.com/mbox/", "series": [ { "id": 27830, "url": "http://patchwork.dpdk.org/api/series/27830/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=27830", "date": "2023-04-23T05:13:58", "name": "Implementation of revised ML xstats spec", "version": 1, "mbox": "http://patchwork.dpdk.org/series/27830/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/126430/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/126430/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 4061F429BA;\n\tSun, 23 Apr 2023 07:14:21 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 13CDB42C4D;\n\tSun, 23 Apr 2023 07:14:13 +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 1AF8A42B7E\n for <dev@dpdk.org>; Sun, 23 Apr 2023 07:14:10 +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 33N3tn83011255 for <dev@dpdk.org>; Sat, 22 Apr 2023 22:14:10 -0700", "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3q4egjjvd1-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Sat, 22 Apr 2023 22:14:10 -0700", "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Sat, 22 Apr 2023 22:14:08 -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; Sat, 22 Apr 2023 22:14:08 -0700", "from ml-host-33.caveonetworks.com (unknown [10.110.143.233])\n by maili.marvell.com (Postfix) with ESMTP id 2B73E3F706A;\n Sat, 22 Apr 2023 22:14:08 -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-type; s=pfpt0220; bh=M1J78lWq7Ym0XAwonBj7hUQAK5SSZeahdwqlfuRkvcU=;\n b=LuTdUPswgFrTWQLmVxlf77K7rv4tyqdCTBtCED/ar6GuxEv0H8BqAOkV761+qCEKgt4o\n yyTNSx/WTYYwl5rvhmg8RTufNWPH0jG97+rBXxcXOtaNkLCPTo4zT4fAhgyYChwd+kfe\n atFZTDo1Sh20+i2vvbo03zFDf6L7Dpo1xxOyIJfHjU8TfdJ60+rW4CG4agcs0E5jYub9\n v3mFGvMTZhMJ4+ayjAztXkjdLApYP89NvTUfhEYudsr0kRAjqu3eLkXrV4gpwzeBJbFU\n vFGGB5+Mg+1ikvnQjaFSuc6/692Qj40VA4vaJhH3z1Ckl2duNdRNVVwWQe0qRQ1BgM/l dA==", "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 2/5] mldev: introduce revised xstats", "Date": "Sat, 22 Apr 2023 22:14:00 -0700", "Message-ID": "<20230423051403.31971-3-syalavarthi@marvell.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20230423051403.31971-1-syalavarthi@marvell.com>", "References": "<20230423051403.31971-1-syalavarthi@marvell.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "B1dJrVQWWaO4zkQ2NKOHGG62-ymaVH6l", "X-Proofpoint-GUID": "B1dJrVQWWaO4zkQ2NKOHGG62-ymaVH6l", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22\n definitions=2023-04-23_02,2023-04-21_01,2023-02-09_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": "Introduce revised xstats APIs to support reporting device and\nper-model xstats. Stat type is selected through mode parameter.\nSupport modes include device and model.\n\nSigned-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>\n---\n lib/mldev/rte_mldev.h | 113 ++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 113 insertions(+)", "diff": "diff --git a/lib/mldev/rte_mldev.h b/lib/mldev/rte_mldev.h\nindex 1e967a7c2a..222ecbdbe1 100644\n--- a/lib/mldev/rte_mldev.h\n+++ b/lib/mldev/rte_mldev.h\n@@ -593,6 +593,16 @@ __rte_experimental\n void\n rte_ml_dev_stats_reset(int16_t dev_id);\n \n+/**\n+ * Selects the component of the mldev to retrieve statistics from.\n+ */\n+enum rte_ml_dev_xstats_mode {\n+\tRTE_ML_DEV_XSTATS_DEVICE,\n+\t/**< Device xstats */\n+\tRTE_ML_DEV_XSTATS_MODEL,\n+\t/**< Model xstats */\n+};\n+\n /**\n * A name-key lookup element for extended statistics.\n *\n@@ -605,6 +615,109 @@ struct rte_ml_dev_xstats_map {\n \t/**< xstat name */\n };\n \n+/**\n+ * Retrieve names of extended statistics of an ML device.\n+ *\n+ * @param dev_id\n+ * The identifier of the device.\n+ * @param mode\n+ * Mode of statistics to retrieve. Choices include the device statistics and model statistics.\n+ * @param model_id\n+ * Used to specify the model number in model mode, and is ignored in device mode.\n+ * @param[out] xstats_map\n+ * Block of memory to insert names and ids into. Must be at least size in capacity. If set to\n+ * NULL, function returns required capacity. The id values returned can be passed to\n+ * *rte_ml_dev_xstats_get* to select statistics.\n+ * @param size\n+ * Capacity of xstats_names (number of xstats_map).\n+ * @return\n+ * - Positive value lower or equal to size: success. The return value is the number of entries\n+ * filled in the stats table.\n+ * - Positive value higher than size: error, the given statistics table is too small. The return\n+ * value corresponds to the size that should be given to succeed. The entries in the table are not\n+ * valid and shall not be used by the caller.\n+ * - Negative value on error:\n+ * -ENODEV for invalid *dev_id*.\n+ * -EINVAL for invalid mode, model parameters.\n+ * -ENOTSUP if the device doesn't support this function.\n+ */\n+__rte_experimental\n+int\n+rte_ml_dev_xstats_names_get(int16_t dev_id, enum rte_ml_dev_xstats_mode mode, int32_t model_id,\n+\t\t\t struct rte_ml_dev_xstats_map *xstats_map, uint32_t size);\n+\n+/**\n+ * Retrieve the value of a single stat by requesting it by name.\n+ *\n+ * @param dev_id\n+ * The identifier of the device.\n+ * @param name\n+ * Name of stat name to retrieve.\n+ * @param[out] stat_id\n+ * If non-NULL, the numerical id of the stat will be returned, so that further requests for the\n+ * stat can be got using rte_ml_dev_xstats_get, which will be faster as it doesn't need to scan a\n+ * list of names for the stat. If the stat cannot be found, the id returned will be (unsigned)-1.\n+ * @param[out] value\n+ * Value of the stat to be returned.\n+ * @return\n+ * - Zero: No error.\n+ * - Negative value: -EINVAL if stat not found, -ENOTSUP if not supported.\n+ */\n+__rte_experimental\n+int\n+rte_ml_dev_xstats_by_name_get(int16_t dev_id, const char *name, uint16_t *stat_id, uint64_t *value);\n+\n+/**\n+ * Retrieve extended statistics of an ML device.\n+ *\n+ * @param dev_id\n+ * The identifier of the device.\n+ * @param mode\n+ * Mode of statistics to retrieve. Choices include the device statistics and model statistics.\n+ * @param model_id\n+ * Used to specify the model id in model mode, and is ignored in device mode.\n+ * @param stat_ids\n+ * ID numbers of the stats to get. The ids can be got from the stat position in the stat list from\n+ * rte_ml_dev_xstats_names_get(), or by using rte_ml_dev_xstats_by_name_get().\n+ * @param[out] values\n+ * Values for each stats request by ID.\n+ * @param nb_ids\n+ * Number of stats requested.\n+ * @return\n+ * - Positive value: number of stat entries filled into the values array\n+ * - Negative value on error:\n+ * -ENODEV for invalid *dev_id*.\n+ * -EINVAL for invalid mode, model id or stat id parameters.\n+ * -ENOTSUP if the device doesn't support this function.\n+ */\n+__rte_experimental\n+int\n+rte_ml_dev_xstats_get(int16_t dev_id, enum rte_ml_dev_xstats_mode mode, int32_t model_id,\n+\t\t const uint16_t stat_ids[], uint64_t values[], uint16_t nb_ids);\n+\n+/**\n+ * Reset the values of the xstats of the selected component in the device.\n+ *\n+ * @param dev_id\n+ * The identifier of the device.\n+ * @param mode\n+ * Mode of the statistics to reset. Choose from device or model.\n+ * @param model_id\n+ * Model stats to reset. 0 and positive values select models, while -1 indicates all models.\n+ * @param stat_ids\n+ * Selects specific statistics to be reset. When NULL, all statistics selected by *mode* will be\n+ * reset. If non-NULL, must point to array of at least *nb_ids* size.\n+ * @param nb_ids\n+ * The number of ids available from the *ids* array. Ignored when ids is NULL.\n+ * @return\n+ * - Zero: successfully reset the statistics.\n+ * - Negative value: -EINVAL invalid parameters, -ENOTSUP if not supported.\n+ */\n+__rte_experimental\n+int\n+rte_ml_dev_xstats_reset(int16_t dev_id, enum rte_ml_dev_xstats_mode mode, int32_t model_id,\n+\t\t\tconst uint16_t stat_ids[], uint16_t nb_ids);\n+\n /**\n * Dump internal information about *dev_id* to the FILE* provided in *fd*.\n *\n", "prefixes": [ "v1", "2/5" ] }{ "id": 126430, "url": "