Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/91515/?format=api
https://patches.dpdk.org/api/patches/91515/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1618454426-21457-1-git-send-email-oulijun@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": "<1618454426-21457-1-git-send-email-oulijun@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1618454426-21457-1-git-send-email-oulijun@huawei.com", "date": "2021-04-15T02:40:26", "name": "[V3] ethdev: add queue state when retrieve queue information", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "934a3896f9501823a8f1d7b8f8f91a434636f91f", "submitter": { "id": 1675, "url": "https://patches.dpdk.org/api/people/1675/?format=api", "name": "Lijun Ou", "email": "oulijun@huawei.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1618454426-21457-1-git-send-email-oulijun@huawei.com/mbox/", "series": [ { "id": 16387, "url": "https://patches.dpdk.org/api/series/16387/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16387", "date": "2021-04-15T02:40:26", "name": "[V3] ethdev: add queue state when retrieve queue information", "version": 3, "mbox": "https://patches.dpdk.org/series/16387/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/91515/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/91515/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 6048BA0A02;\n\tThu, 15 Apr 2021 04:40:15 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2FF23161F25;\n\tThu, 15 Apr 2021 04:40:15 +0200 (CEST)", "from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190])\n by mails.dpdk.org (Postfix) with ESMTP id 04E90161F23\n for <dev@dpdk.org>; Thu, 15 Apr 2021 04:40:13 +0200 (CEST)", "from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58])\n by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FLNmf66YTz18HZt;\n Thu, 15 Apr 2021 10:37:54 +0800 (CST)", "from localhost.localdomain (10.69.192.56) by\n DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id\n 14.3.498.0; Thu, 15 Apr 2021 10:40:07 +0800" ], "From": "Lijun Ou <oulijun@huawei.com>", "To": "<thomas@monjalon.net>, <ferruh.yigit@intel.com>", "CC": "<dev@dpdk.org>, <linuxarm@openeuler.org>", "Date": "Thu, 15 Apr 2021 10:40:26 +0800", "Message-ID": "<1618454426-21457-1-git-send-email-oulijun@huawei.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1616670560-62333-1-git-send-email-oulijun@huawei.com>", "References": "<1616670560-62333-1-git-send-email-oulijun@huawei.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.69.192.56]", "X-CFilter-Loop": "Reflected", "Subject": "[dpdk-dev] [PATCH V3] ethdev: add queue state when retrieve queue\n information", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Currently, upper-layer application could get queue state only\nthrough pointers such as dev->data->tx_queue_state[queue_id],\nthis is not the recommended way to access it. So this patch\nadd get queue state when call rte_eth_rx_queue_info_get and\nrte_eth_tx_queue_info_get API.\n\nNote: After add queue_state field, the 'struct rte_eth_rxq_info' size\nremains 128B, and the 'struct rte_eth_txq_info' size remains 64B, so\nit could be ABI compatible.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nSigned-off-by: Lijun Ou <oulijun@huawei.com>\n---\nV2->V3:\n- rewrite the commit log and delete the part Note\n- rewrite tht comments for queue state\n- move the queue_state definition locations\n\nV1->V2:\n- move queue state defines to public file\n---\n doc/guides/rel_notes/release_21_05.rst | 6 ++++++\n lib/librte_ethdev/ethdev_driver.h | 7 -------\n lib/librte_ethdev/rte_ethdev.c | 3 +++\n lib/librte_ethdev/rte_ethdev.h | 9 +++++++++\n 4 files changed, 18 insertions(+), 7 deletions(-)", "diff": "diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst\nindex 3bd7757..c6e45e2 100644\n--- a/doc/guides/rel_notes/release_21_05.rst\n+++ b/doc/guides/rel_notes/release_21_05.rst\n@@ -251,6 +251,12 @@ ABI Changes\n function was already marked as internal in the API documentation for it,\n and was not for use by external applications.\n \n+* Added new field ``queue_state`` to ``rte_eth_rxq_info`` structure\n+ to provide indicated rxq queue state.\n+\n+* Added new field ``queue_state`` to ``rte_eth_txq_info`` structure\n+ to provide indicated txq queue state.\n+\n \n Known Issues\n ------------\ndiff --git a/lib/librte_ethdev/ethdev_driver.h b/lib/librte_ethdev/ethdev_driver.h\nindex 113129d..40e474a 100644\n--- a/lib/librte_ethdev/ethdev_driver.h\n+++ b/lib/librte_ethdev/ethdev_driver.h\n@@ -952,13 +952,6 @@ struct eth_dev_ops {\n };\n \n /**\n- * RX/TX queue states\n- */\n-#define RTE_ETH_QUEUE_STATE_STOPPED 0\n-#define RTE_ETH_QUEUE_STATE_STARTED 1\n-#define RTE_ETH_QUEUE_STATE_HAIRPIN 2\n-\n-/**\n * @internal\n * Check if the selected Rx queue is hairpin queue.\n *\ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 6b5cfd6..ab188ec 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -5042,6 +5042,8 @@ rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,\n \n \tmemset(qinfo, 0, sizeof(*qinfo));\n \tdev->dev_ops->rxq_info_get(dev, queue_id, qinfo);\n+\tqinfo->queue_state = dev->data->rx_queue_state[queue_id];\n+\n \treturn 0;\n }\n \n@@ -5082,6 +5084,7 @@ rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,\n \n \tmemset(qinfo, 0, sizeof(*qinfo));\n \tdev->dev_ops->txq_info_get(dev, queue_id, qinfo);\n+\tqinfo->queue_state = dev->data->tx_queue_state[queue_id];\n \n \treturn 0;\n }\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex 3b773b6..a0d01d2 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -1588,6 +1588,13 @@ struct rte_eth_dev_info {\n };\n \n /**\n+ * RX/TX queue states\n+ */\n+#define RTE_ETH_QUEUE_STATE_STOPPED 0\n+#define RTE_ETH_QUEUE_STATE_STARTED 1\n+#define RTE_ETH_QUEUE_STATE_HAIRPIN 2\n+\n+/**\n * Ethernet device RX queue information structure.\n * Used to retrieve information about configured queue.\n */\n@@ -1595,6 +1602,7 @@ struct rte_eth_rxq_info {\n \tstruct rte_mempool *mp; /**< mempool used by that queue. */\n \tstruct rte_eth_rxconf conf; /**< queue config parameters. */\n \tuint8_t scattered_rx; /**< scattered packets RX supported. */\n+\tuint8_t queue_state; /**< one of RTE_ETH_QUEUE_STATE_*. */\n \tuint16_t nb_desc; /**< configured number of RXDs. */\n \tuint16_t rx_buf_size; /**< hardware receive buffer size. */\n } __rte_cache_min_aligned;\n@@ -1606,6 +1614,7 @@ struct rte_eth_rxq_info {\n struct rte_eth_txq_info {\n \tstruct rte_eth_txconf conf; /**< queue config parameters. */\n \tuint16_t nb_desc; /**< configured number of TXDs. */\n+\tuint8_t queue_state; /**< one of RTE_ETH_QUEUE_STATE_*. */\n } __rte_cache_min_aligned;\n \n /* Generic Burst mode flag definition, values can be ORed. */\n", "prefixes": [ "V3" ] }{ "id": 91515, "url": "