Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/115233/?format=api
https://patches.dpdk.org/api/patches/115233/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220818093744.76157-1-mb@smartsharesystems.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": "<20220818093744.76157-1-mb@smartsharesystems.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220818093744.76157-1-mb@smartsharesystems.com", "date": "2022-08-18T09:37:44", "name": "ethdev: rte_eth_rx_queue_count is a dataplane function", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "125e31ea0ce1eae77342aff596d2c02ae2a7d3f7", "submitter": { "id": 591, "url": "https://patches.dpdk.org/api/people/591/?format=api", "name": "Morten Brørup", "email": "mb@smartsharesystems.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/20220818093744.76157-1-mb@smartsharesystems.com/mbox/", "series": [ { "id": 24354, "url": "https://patches.dpdk.org/api/series/24354/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24354", "date": "2022-08-18T09:37:44", "name": "ethdev: rte_eth_rx_queue_count is a dataplane function", "version": 1, "mbox": "https://patches.dpdk.org/series/24354/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/115233/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/115233/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 74B08A034C;\n\tThu, 18 Aug 2022 11:37:50 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 281B840694;\n\tThu, 18 Aug 2022 11:37:50 +0200 (CEST)", "from smartserver.smartsharesystems.com\n (smartserver.smartsharesystems.com [77.243.40.215])\n by mails.dpdk.org (Postfix) with ESMTP id 946F240156\n for <dev@dpdk.org>; Thu, 18 Aug 2022 11:37:49 +0200 (CEST)", "from dkrd2.smartsharesys.local ([192.168.4.12]) by\n smartserver.smartsharesystems.com with Microsoft SMTPSVC(6.0.3790.4675);\n Thu, 18 Aug 2022 11:37:48 +0200" ], "From": "=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>", "To": "thomas@monjalon.net, ferruh.yigit@xilinx.com,\n andrew.rybchenko@oktetlabs.ru", "Cc": "dev@dpdk.org, =?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>", "Subject": "[PATCH] ethdev: rte_eth_rx_queue_count is a dataplane function", "Date": "Thu, 18 Aug 2022 11:37:44 +0200", "Message-Id": "<20220818093744.76157-1-mb@smartsharesystems.com>", "X-Mailer": "git-send-email 2.17.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-OriginalArrivalTime": "18 Aug 2022 09:37:48.0030 (UTC)\n FILETIME=[2D5691E0:01D8B2E6]", "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": "Applications may use rte_eth_rx_queue_count() in the RX stage of the\ndataplane, so only check the function parameters if built with\nRTE_ETHDEV_DEBUG_RX.\n\nSigned-off-by: Morten Brørup <mb@smartsharesystems.com>\n---\n lib/ethdev/rte_ethdev.h | 14 +++++++++++---\n 1 file changed, 11 insertions(+), 3 deletions(-)", "diff": "diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex de9e970d4d..8d5d9b42bf 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -5681,6 +5681,10 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,\n /**\n * Get the number of used descriptors of a Rx queue\n *\n+ * Since it's a dataplane function, no check is performed on port_id and\n+ * queue_id. The caller must therefore ensure that the port is enabled\n+ * and the queue is configured and running.\n+ *\n * @param port_id\n * The port identifier of the Ethernet device.\n * @param queue_id\n@@ -5688,8 +5692,8 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,\n * @return\n * The number of used descriptors in the specific queue, or:\n * - (-ENODEV) if *port_id* is invalid.\n- * (-EINVAL) if *queue_id* is invalid\n- * (-ENOTSUP) if the device does not support this function\n+ * - (-EINVAL) if *queue_id* is invalid\n+ * - (-ENOTSUP) if the device does not support this function\n */\n static inline int\n rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)\n@@ -5697,6 +5701,7 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)\n \tstruct rte_eth_fp_ops *p;\n \tvoid *qd;\n \n+#ifdef RTE_ETHDEV_DEBUG_RX\n \tif (port_id >= RTE_MAX_ETHPORTS ||\n \t\t\tqueue_id >= RTE_MAX_QUEUES_PER_PORT) {\n \t\tRTE_ETHDEV_LOG(ERR,\n@@ -5704,16 +5709,19 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)\n \t\t\tport_id, queue_id);\n \t\treturn -EINVAL;\n \t}\n+#endif\n \n \t/* fetch pointer to queue data */\n \tp = &rte_eth_fp_ops[port_id];\n \tqd = p->rxq.data[queue_id];\n \n+#ifdef RTE_ETHDEV_DEBUG_RX\n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n-\tRTE_FUNC_PTR_OR_ERR_RET(*p->rx_queue_count, -ENOTSUP);\n \tif (qd == NULL)\n \t\treturn -EINVAL;\n+#endif\n \n+\tRTE_FUNC_PTR_OR_ERR_RET(*p->rx_queue_count, -ENOTSUP);\n \treturn (int)(*p->rx_queue_count)(qd);\n }\n \n", "prefixes": [] }{ "id": 115233, "url": "