Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/112202/?format=api
https://patches.dpdk.org/api/patches/112202/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220601074930.10313-2-humin29@huawei.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": "<20220601074930.10313-2-humin29@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220601074930.10313-2-humin29@huawei.com", "date": "2022-06-01T07:49:27", "name": "[v3,1/4] ethdev: introduce ethdev HW desc dump PI", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d2a52167e1fc0284bdbdf307a4ba9506c5c09d0e", "submitter": { "id": 1944, "url": "https://patches.dpdk.org/api/people/1944/?format=api", "name": "humin (Q)", "email": "humin29@huawei.com" }, "delegate": { "id": 3961, "url": "https://patches.dpdk.org/api/users/3961/?format=api", "username": "arybchenko", "first_name": "Andrew", "last_name": "Rybchenko", "email": "andrew.rybchenko@oktetlabs.ru" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220601074930.10313-2-humin29@huawei.com/mbox/", "series": [ { "id": 23282, "url": "https://patches.dpdk.org/api/series/23282/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=23282", "date": "2022-06-01T07:49:26", "name": "support HW Rx/Tx descriptor dump", "version": 3, "mbox": "https://patches.dpdk.org/series/23282/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/112202/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/112202/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 E2BF4A0548;\n\tWed, 1 Jun 2022 09:51:14 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 238304281E;\n\tWed, 1 Jun 2022 09:51:08 +0200 (CEST)", "from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189])\n by mails.dpdk.org (Postfix) with ESMTP id 01F8F40694\n for <dev@dpdk.org>; Wed, 1 Jun 2022 09:51:06 +0200 (CEST)", "from kwepemi500012.china.huawei.com (unknown [172.30.72.53])\n by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4LChCK5SN3zDqbX\n for <dev@dpdk.org>; Wed, 1 Jun 2022 15:50:37 +0800 (CST)", "from localhost.localdomain (10.69.192.56) by\n kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2375.24; Wed, 1 Jun 2022 15:50:48 +0800" ], "From": "\"Min Hu (Connor)\" <humin29@huawei.com>", "To": "<dev@dpdk.org>", "Subject": "[PATCH v3 1/4] ethdev: introduce ethdev HW desc dump PI", "Date": "Wed, 1 Jun 2022 15:49:27 +0800", "Message-ID": "<20220601074930.10313-2-humin29@huawei.com>", "X-Mailer": "git-send-email 2.33.0", "In-Reply-To": "<20220601074930.10313-1-humin29@huawei.com>", "References": "<20220527023351.40577-1-humin29@huawei.com>\n <20220601074930.10313-1-humin29@huawei.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Originating-IP": "[10.69.192.56]", "X-ClientProxiedBy": "dggems701-chm.china.huawei.com (10.3.19.178) To\n kwepemi500012.china.huawei.com (7.221.188.12)", "X-CFilter-Loop": "Reflected", "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 the ethdev HW Rx desc dump API which provides functions for query\nHW descriptor from device. HW descriptor info differs in different NICs.\nThe information demonstrates I/O process which is important for debug.\nAs the information is different between NICs, the new API is introduced.\n\nSigned-off-by: Min Hu (Connor) <humin29@huawei.com>\n---\n doc/guides/rel_notes/release_22_07.rst | 7 ++++\n lib/ethdev/ethdev_driver.h | 42 ++++++++++++++++++++++++\n lib/ethdev/rte_ethdev.c | 44 ++++++++++++++++++++++++++\n lib/ethdev/rte_ethdev.h | 44 ++++++++++++++++++++++++++\n lib/ethdev/version.map | 2 ++\n 5 files changed, 139 insertions(+)", "diff": "diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst\nindex 8932a1d478..56c675121a 100644\n--- a/doc/guides/rel_notes/release_22_07.rst\n+++ b/doc/guides/rel_notes/release_22_07.rst\n@@ -137,6 +137,13 @@ New Features\n * ``RTE_EVENT_QUEUE_ATTR_WEIGHT``\n * ``RTE_EVENT_QUEUE_ATTR_AFFINITY``\n \n+* **Added ethdev HW desc dump API, to dump Rx/Tx HW desc info from device.**\n+\n+ Added the ethdev HW Rx desc dump API which provides functions for query\n+ HW descriptor from device. HW descriptor info differs in different NICs.\n+ The information demonstrates I/O process which is important for debug.\n+ As the information is different between NICs, the new API is introduced.\n+\n \n Removed Items\n -------------\ndiff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h\nindex 69d9dc21d8..9c1726eb2d 100644\n--- a/lib/ethdev/ethdev_driver.h\n+++ b/lib/ethdev/ethdev_driver.h\n@@ -1073,6 +1073,42 @@ typedef int (*eth_ip_reassembly_conf_set_t)(struct rte_eth_dev *dev,\n */\n typedef int (*eth_dev_priv_dump_t)(struct rte_eth_dev *dev, FILE *file);\n \n+/**\n+ * @internal\n+ * Dump ethdev Rx descriptor info to a file.\n+ *\n+ * @param file\n+ * A pointer to a file for output.\n+ * @param dev\n+ * Port (ethdev) handle.\n+ * @param queue_id\n+ * The selected queue.\n+ * @param desc_id\n+ * The selected descriptor.\n+ * @return\n+ * Negative errno value on error, zero on success.\n+ */\n+typedef int (*eth_rx_hw_desc_dump_t)(FILE *file, const struct rte_eth_dev *dev,\n+\t\t\t\t uint16_t queue_id, uint16_t desc_id);\n+\n+/**\n+ * @internal\n+ * Dump ethdev Tx descriptor info to a file.\n+ *\n+ * @param file\n+ * A pointer to a file for output.\n+ * @param dev\n+ * Port (ethdev) handle.\n+ * @param queue_id\n+ * The selected queue.\n+ * @param desc_id\n+ * The selected descriptor.\n+ * @return\n+ * Negative errno value on error, zero on success.\n+ */\n+typedef int (*eth_tx_hw_desc_dump_t)(FILE *file, const struct rte_eth_dev *dev,\n+\t\t\t\t uint16_t queue_id, uint16_t desc_id);\n+\n /**\n * @internal A structure containing the functions exported by an Ethernet driver.\n */\n@@ -1283,6 +1319,12 @@ struct eth_dev_ops {\n \n \t/** Dump private info from device */\n \teth_dev_priv_dump_t eth_dev_priv_dump;\n+\n+\t/** Dump ethdev Rx descriptor info */\n+\teth_rx_hw_desc_dump_t eth_rx_hw_desc_dump;\n+\n+\t/** Dump ethdev Tx descriptor info */\n+\teth_tx_hw_desc_dump_t eth_tx_hw_desc_dump;\n };\n \n /**\ndiff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 46c088dc88..bbd8439fa0 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -5876,6 +5876,50 @@ rte_eth_dev_priv_dump(uint16_t port_id, FILE *file)\n \treturn eth_err(port_id, (*dev->dev_ops->eth_dev_priv_dump)(dev, file));\n }\n \n+int\n+rte_eth_rx_hw_desc_dump(FILE *file, uint16_t port_id, uint16_t queue_id,\n+\t\t\tuint16_t desc_id)\n+{\n+\tstruct rte_eth_dev *dev;\n+\tint ret;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tif (queue_id >= dev->data->nb_rx_queues) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid Rx queue_id=%u\\n\", queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->eth_rx_hw_desc_dump, -ENOTSUP);\n+\tret = (*dev->dev_ops->eth_rx_hw_desc_dump)(file, dev, queue_id,\n+\t\t\t\t\t\t desc_id);\n+\n+\treturn ret;\n+}\n+\n+int\n+rte_eth_tx_hw_desc_dump(FILE *file, uint16_t port_id, uint16_t queue_id,\n+\t\t\tuint16_t desc_id)\n+{\n+\tstruct rte_eth_dev *dev;\n+\tint ret;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tif (queue_id >= dev->data->nb_tx_queues) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid Tx queue_id=%u\\n\", queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->eth_tx_hw_desc_dump, -ENOTSUP);\n+\tret = (*dev->dev_ops->eth_tx_hw_desc_dump)(file, dev, queue_id,\n+\t\t\t\t\t\t desc_id);\n+\n+\treturn ret;\n+}\n+\n RTE_LOG_REGISTER_DEFAULT(rte_eth_dev_logtype, INFO);\n \n RTE_INIT(ethdev_init_telemetry)\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex 02df65d923..56ae630209 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -5456,6 +5456,50 @@ typedef struct {\n __rte_experimental\n int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ *\n+ * Dump ethdev Rx descriptor info to a file.\n+ *\n+ * @param file\n+ * A pointer to a file for output.\n+ * @param dev\n+ * Port (ethdev) handle.\n+ * @param queue_id\n+ * The selected queue.\n+ * @param desc_id\n+ * The selected descriptor.\n+ * @return\n+ * - On success, zero.\n+ * - On failure, a negative value.\n+ */\n+__rte_experimental\n+int rte_eth_rx_hw_desc_dump(FILE *file, uint16_t port_id, uint16_t queue_id,\n+\t\t\t uint16_t desc_id);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ *\n+ * Dump ethdev Tx descriptor info to a file.\n+ *\n+ * @param file\n+ * A pointer to a file for output.\n+ * @param dev\n+ * Port (ethdev) handle.\n+ * @param queue_id\n+ * The selected queue.\n+ * @param desc_id\n+ * The selected descriptor.\n+ * @return\n+ * - On success, zero.\n+ * - On failure, a negative value.\n+ */\n+__rte_experimental\n+int rte_eth_tx_hw_desc_dump(FILE *file, uint16_t port_id, uint16_t queue_id,\n+\t\t\t uint16_t desc_id);\n+\n #include <rte_ethdev_core.h>\n \n /**\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex daca7851f2..109f4ea818 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -285,6 +285,8 @@ EXPERIMENTAL {\n \trte_mtr_color_in_protocol_priority_get;\n \trte_mtr_color_in_protocol_set;\n \trte_mtr_meter_vlan_table_update;\n+\trte_eth_rx_hw_desc_dump;\n+\trte_eth_tx_hw_desc_dump;\n };\n \n INTERNAL {\n", "prefixes": [ "v3", "1/4" ] }{ "id": 112202, "url": "