get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/91738/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 91738,
    "url": "http://patches.dpdk.org/api/patches/91738/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1618822650-50500-1-git-send-email-oulijun@huawei.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1618822650-50500-1-git-send-email-oulijun@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1618822650-50500-1-git-send-email-oulijun@huawei.com",
    "date": "2021-04-19T08:57:30",
    "name": "[v7] ethdev: add queue state when retrieve queue information",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b5c26c1e01a1f1f70848f41e22188168e17997d9",
    "submitter": {
        "id": 1675,
        "url": "http://patches.dpdk.org/api/people/1675/?format=api",
        "name": "Lijun Ou",
        "email": "oulijun@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1618822650-50500-1-git-send-email-oulijun@huawei.com/mbox/",
    "series": [
        {
            "id": 16483,
            "url": "http://patches.dpdk.org/api/series/16483/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16483",
            "date": "2021-04-19T08:57:30",
            "name": "[v7] ethdev: add queue state when retrieve queue information",
            "version": 7,
            "mbox": "http://patches.dpdk.org/series/16483/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/91738/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/91738/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 D26D2A0547;\n\tMon, 19 Apr 2021 10:57:20 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 96C7B40683;\n\tMon, 19 Apr 2021 10:57:20 +0200 (CEST)",
            "from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190])\n by mails.dpdk.org (Postfix) with ESMTP id 90E1040040\n for <dev@dpdk.org>; Mon, 19 Apr 2021 10:57:19 +0200 (CEST)",
            "from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60])\n by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FP0x72hhgzpZMp;\n Mon, 19 Apr 2021 16:54:19 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id\n 14.3.498.0; Mon, 19 Apr 2021 16:57:16 +0800"
        ],
        "From": "Lijun Ou <oulijun@huawei.com>",
        "To": "<thomas@monjalon.net>, <ferruh.yigit@intel.com>",
        "CC": "<dev@dpdk.org>, <linuxarm@openeuler.org>",
        "Date": "Mon, 19 Apr 2021 16:57:30 +0800",
        "Message-ID": "<1618822650-50500-1-git-send-email-oulijun@huawei.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1618797806-64536-1-git-send-email-oulijun@huawei.com>",
        "References": "<1618797806-64536-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 v7] 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>\nAcked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\nV6->V7:\n- reword the note title for \"New Feature\"\n- use Rx/Tx queue instead of rxq/txq queue\n\nV5->V6:\n- add updated update libabigail.abignore\n\nV4->V5:\n- add acked-by\n- add a note to the \"New features\" section to annouce the new feature.\n\nV3->V4:\n- update libabigail.abignore for removing the CI warnings\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 devtools/libabigail.abignore           | 12 +++++++++++-\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 5 files changed, 29 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore\nindex 6c0b389..d8082cf 100644\n--- a/devtools/libabigail.abignore\n+++ b/devtools/libabigail.abignore\n@@ -19,4 +19,14 @@\n ; Ignore fields inserted in cacheline boundary of rte_cryptodev\n [suppress_type]\n         name = rte_cryptodev\n-        has_data_member_inserted_between = {offset_after(attached), end}\n\\ No newline at end of file\n+        has_data_member_inserted_between = {offset_after(attached), end}\n+\n+; Ignore fields inserted in alignment hole of rte_eth_rxq_info\n+[suppress_type]\n+\tname = rte_eth_rxq_info\n+\thas_data_member_inserted_at = offset_after(scattered_rx)\n+\n+; Ignore fields inserted in cacheline boundary of rte_eth_txq_info\n+[suppress_type]\n+\tname = rte_eth_txq_info\n+\thas_data_member_inserted_between = {offset_after(nb_desc), end}\ndiff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst\nindex 58272e1..05b2f0c 100644\n--- a/doc/guides/rel_notes/release_21_05.rst\n+++ b/doc/guides/rel_notes/release_21_05.rst\n@@ -81,6 +81,12 @@ New Features\n       representor=[[c#]pf#]sf# sf[0,2-1023] /* 1023 SFs.                     */\n       representor=[c#]pf#      c2pf[0,1]    /* 2 PFs on controller 2.        */\n \n+* **Added queue state in queried Rx/Tx queue info.**\n+  * Added new field ``queue_state`` to ``rte_eth_rxq_info`` structure to\n+    provide indicated Rx queue state.\n+  * Added new field ``queue_state`` to ``rte_eth_txq_info`` structure to\n+    provide indicated Tx queue state.\n+\n * **Added support for meter PPS profile.**\n \n   Currently meter algorithms only supports bytes per second(BPS).\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 c73d263..d5adf4f 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -5038,6 +5038,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@@ -5078,6 +5080,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": [
        "v7"
    ]
}