Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/127951/?format=api
http://patchwork.dpdk.org/api/patches/127951/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230602075211.3628165-2-huangdengdui@huawei.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": "<20230602075211.3628165-2-huangdengdui@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230602075211.3628165-2-huangdengdui@huawei.com", "date": "2023-06-02T07:52:10", "name": "[v4,1/2] ethdev: add API to check if queue is valid", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "f57d950b40c0636f8b326095ab85b23a6554db77", "submitter": { "id": 3066, "url": "http://patchwork.dpdk.org/api/people/3066/?format=api", "name": "huangdengdui", "email": "huangdengdui@huawei.com" }, "delegate": { "id": 319, "url": "http://patchwork.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230602075211.3628165-2-huangdengdui@huawei.com/mbox/", "series": [ { "id": 28319, "url": "http://patchwork.dpdk.org/api/series/28319/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28319", "date": "2023-06-02T07:52:09", "name": "add Rx/Tx queue ID check API and use it to fix a bug", "version": 4, "mbox": "http://patchwork.dpdk.org/series/28319/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/127951/comments/", "check": "warning", "checks": "http://patchwork.dpdk.org/api/patches/127951/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 EDD7242C0E;\n\tFri, 2 Jun 2023 09:52:26 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 298E842D0B;\n\tFri, 2 Jun 2023 09:52:18 +0200 (CEST)", "from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255])\n by mails.dpdk.org (Postfix) with ESMTP id A0FED406B8\n for <dev@dpdk.org>; Fri, 2 Jun 2023 09:52:14 +0200 (CEST)", "from dggpeml500011.china.huawei.com (unknown [172.30.72.55])\n by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4QXZpq2X5yz18M55;\n Fri, 2 Jun 2023 15:47:31 +0800 (CST)", "from localhost.huawei.com (10.50.163.32) by\n dggpeml500011.china.huawei.com (7.185.36.84) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.23; Fri, 2 Jun 2023 15:52:12 +0800" ], "From": "Dengdui Huang <huangdengdui@huawei.com>", "To": "<dev@dpdk.org>", "CC": "<ferruh.yigit@amd.com>, <stephen@networkplumber.org>,\n <thomas@monjalon.net>, <aman.deep.singh@intel.com>, <yuying.zhang@intel.com>,\n <andrew.rybchenko@oktetlabs.ru>, <anatoly.burakov@intel.com>,\n <lihuisong@huawei.com>, <liuyonglong@huawei.com>, <liudongdong3@huawei.com>", "Subject": "[PATCH v4 1/2] ethdev: add API to check if queue is valid", "Date": "Fri, 2 Jun 2023 15:52:10 +0800", "Message-ID": "<20230602075211.3628165-2-huangdengdui@huawei.com>", "X-Mailer": "git-send-email 2.33.0", "In-Reply-To": "<20230602075211.3628165-1-huangdengdui@huawei.com>", "References": "<20230516110021.1801443-1-huangdengdui@huawei.com>\n <20230602075211.3628165-1-huangdengdui@huawei.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Originating-IP": "[10.50.163.32]", "X-ClientProxiedBy": "dggems706-chm.china.huawei.com (10.3.19.183) To\n dggpeml500011.china.huawei.com (7.185.36.84)", "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": "The API rte_eth_dev_is_valid_rxq/txq which\nis used to check if Rx/Tx queue is valid.\nIf the queue has been setup, it is considered valid.\n\nSigned-off-by: Dengdui Huang <huangdengdui@huawei.com>\n---\n doc/guides/rel_notes/release_23_07.rst | 6 ++++\n lib/ethdev/rte_ethdev.c | 22 +++++++++++++++\n lib/ethdev/rte_ethdev.h | 38 ++++++++++++++++++++++++++\n lib/ethdev/version.map | 2 ++\n 4 files changed, 68 insertions(+)", "diff": "diff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst\nindex 0d3cada5d0..1332fa3a5a 100644\n--- a/doc/guides/rel_notes/release_23_07.rst\n+++ b/doc/guides/rel_notes/release_23_07.rst\n@@ -83,6 +83,12 @@ New Features\n for new capability registers, large passthrough BAR and some\n performance enhancements for UPT.\n \n+* **Added ethdev Rx/Tx queue ID check API.**\n+\n+ Added ethdev Rx/Tx queue ID check API which provides functions\n+ for check if Rx/Tx queue is valid. If the queue has been setup,\n+ it is considered valid.\n+\n \n Removed Items\n -------------\ndiff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex d46e74504e..a134928c8a 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -771,6 +771,28 @@ eth_dev_validate_tx_queue(const struct rte_eth_dev *dev, uint16_t tx_queue_id)\n \treturn 0;\n }\n \n+int\n+rte_eth_dev_is_valid_rxq(uint16_t port_id, uint16_t queue_id)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\treturn eth_dev_validate_rx_queue(dev, queue_id);\n+}\n+\n+int\n+rte_eth_dev_is_valid_txq(uint16_t port_id, uint16_t queue_id)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\treturn eth_dev_validate_tx_queue(dev, queue_id);\n+}\n+\n int\n rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)\n {\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex 9932413c33..4ef803c244 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -2666,6 +2666,44 @@ int rte_eth_dev_socket_id(uint16_t port_id);\n */\n int rte_eth_dev_is_valid_port(uint16_t port_id);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ *\n+ * Check if Rx queue is valid. If the queue has been setup,\n+ * it is considered valid.\n+ *\n+ * @param port_id\n+ * The port identifier of the Ethernet device.\n+ * @param queue_id\n+ * The index of the receive queue.\n+ * @return\n+ * - -ENODEV: if *port_id* is valid.\n+ * - -EINVAL: if queue is out of range or not been setup.\n+ * - 0 if Rx queue is valid.\n+ */\n+__rte_experimental\n+int rte_eth_dev_is_valid_rxq(uint16_t port_id, uint16_t queue_id);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ *\n+ * Check if Tx queue is valid. If the queue has been setup,\n+ * it is considered valid.\n+ *\n+ * @param port_id\n+ * The port identifier of the Ethernet device.\n+ * @param queue_id\n+ * The index of the transmit queue.\n+ * @return\n+ * - -ENODEV: if *port_id* is valid.\n+ * - -EINVAL: if queue is out of range or not been setup.\n+ * - 0 if Tx queue is valid.\n+ */\n+__rte_experimental\n+int rte_eth_dev_is_valid_txq(uint16_t port_id, uint16_t queue_id);\n+\n /**\n * Start specified Rx queue of a port. It is used when rx_deferred_start\n * flag of the specified queue is true.\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 9d418091ef..3aa6bce156 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -309,6 +309,8 @@ EXPERIMENTAL {\n \trte_flow_async_action_list_handle_destroy;\n \trte_flow_async_action_list_handle_query_update;\n \trte_flow_async_actions_update;\n+\trte_eth_dev_is_valid_rxq;\n+\trte_eth_dev_is_valid_txq;\n };\n \n INTERNAL {\n", "prefixes": [ "v4", "1/2" ] }{ "id": 127951, "url": "