get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 132608,
    "url": "https://patches.dpdk.org/api/patches/132608/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20231013155723.2631644-1-ferruh.yigit@amd.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": "<20231013155723.2631644-1-ferruh.yigit@amd.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231013155723.2631644-1-ferruh.yigit@amd.com",
    "date": "2023-10-13T15:57:23",
    "name": "[v2] ethdev: clarify device queue state after start and stop",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ab70993d7aeda266da59c98414575c92b17a6f45",
    "submitter": {
        "id": 2700,
        "url": "https://patches.dpdk.org/api/people/2700/?format=api",
        "name": "Ferruh Yigit",
        "email": "ferruh.yigit@amd.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/20231013155723.2631644-1-ferruh.yigit@amd.com/mbox/",
    "series": [
        {
            "id": 29837,
            "url": "https://patches.dpdk.org/api/series/29837/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=29837",
            "date": "2023-10-13T15:57:23",
            "name": "[v2] ethdev: clarify device queue state after start and stop",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/29837/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/132608/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/132608/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 3BC1643157;\n\tFri, 13 Oct 2023 17:57:48 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1C914402CC;\n\tFri, 13 Oct 2023 17:57:48 +0200 (CEST)",
            "from NAM10-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam10on2079.outbound.protection.outlook.com [40.107.93.79])\n by mails.dpdk.org (Postfix) with ESMTP id 4AC004027D\n for <dev@dpdk.org>; Fri, 13 Oct 2023 17:57:46 +0200 (CEST)",
            "from SA9PR13CA0156.namprd13.prod.outlook.com (2603:10b6:806:28::11)\n by PH7PR12MB6587.namprd12.prod.outlook.com (2603:10b6:510:211::17)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.46; Fri, 13 Oct\n 2023 15:57:43 +0000",
            "from SA2PEPF00001509.namprd04.prod.outlook.com\n (2603:10b6:806:28:cafe::de) by SA9PR13CA0156.outlook.office365.com\n (2603:10b6:806:28::11) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.16 via Frontend\n Transport; Fri, 13 Oct 2023 15:57:42 +0000",
            "from SATLEXMB04.amd.com (165.204.84.17) by\n SA2PEPF00001509.mail.protection.outlook.com (10.167.242.41) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.20.6838.22 via Frontend Transport; Fri, 13 Oct 2023 15:57:42 +0000",
            "from telcodpdk.amd.com (10.180.168.240) by SATLEXMB04.amd.com\n (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 13 Oct\n 2023 10:57:41 -0500"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=XoC8tVlVOWqd/uHye4T6ASIRgkA9gZx+z63M73lM/4sI5J4yEoT+iYUV7QQdjiC7Hq5J87LBVMsJQkQZReesX8KW+bbXK+4sLG2nSt341TdDdigaV8/zNhk2F8CM1FVI2TUvqSRM8SBgzi7fZS7pVpFjKEtKAxVUZvOOzvj69UUuIQg4QIxN1t6s0SoGDjgA5NrESEQEQXwjXrYhmVS7/Wy6KBlhYxktUfMfK6cqvKHDAIFxg4EcXVGRsLiJ3MVGn56VxIZkqVd1b7faozglny/YZ5pVzSlZSI4xjxmUA1xi76Gvz5rJ4eiyd9Ad78VChav9xWA7hs8/gmJoqGWKFw==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=Ysp4p+hfIUsuYNq75E6yJVQbpXAPOaut87KcBQdIdX8=;\n b=X3G2i7Sy9g0u98WZ7I0p0q6l9kUe8GudYRR9M6/XYGMb9g0uhYUIFustiuo/Drny8PAi2SFtE4gP4Nok3C3X0RPZLJqbbGvjujsgvoNp4fD1bfGu0Ti+Am+yKXrRzHnBWQj/uCfjb84rcqhuylLubElRaW1UdxyYJnwTMGD8+uxByLQalBTe2zk6FfRZPNc2Fj4duzXs9mGmjozwgsO8H6b6GN/8ZR6QqoRR/WTXXJOSfjL1P7PYNKaMb832myP7M8HaaFc02UOudxhbw5gKXJo8UWK8g3EO19h2QauP1HRYtHJGAaKUQWj43V4KbFH1P6lTOJqqwBePCvnwDq4zqg==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 165.204.84.17) smtp.rcpttodomain=monjalon.net smtp.mailfrom=amd.com;\n dmarc=pass (p=quarantine sp=quarantine pct=100) action=none\n header.from=amd.com; dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=Ysp4p+hfIUsuYNq75E6yJVQbpXAPOaut87KcBQdIdX8=;\n b=sQcWcTGdAsxPkZM6fD7USZ7n+BlUgYEEJOIMOUxmUWgl2p/JY+iYSOT3M007xZdI0Xc3k3J5VGt7Wx+W8O0MFTlOnb7D2ROKHsqC43R8T6p0RZ5V47/lC5PFVHEha9GifNb9pocIQ9vXY3znfmrGSw8skGjrG9duCcPgnpNXM7E=",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 165.204.84.17)\n smtp.mailfrom=amd.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=amd.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of amd.com designates\n 165.204.84.17 as permitted sender) receiver=protection.outlook.com;\n client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C",
        "From": "Ferruh Yigit <ferruh.yigit@amd.com>",
        "To": "Thomas Monjalon <thomas@monjalon.net>, Andrew Rybchenko\n <andrew.rybchenko@oktetlabs.ru>",
        "CC": "<dev@dpdk.org>, David Marchand <david.marchand@redhat.com>, Jie Hai\n <haijie1@huawei.com>, Song Jiale <songx.jiale@intel.com>, Yuan Peng\n <yuan.peng@intel.com>, Raslan Darawsheh <rasland@nvidia.com>, Qiming Yang\n <qiming.yang@intel.com>, Ivan Malov <ivan.malov@arknetworks.am>, Huisong Li\n <lihuisong@huawei.com>",
        "Subject": "[PATCH v2] ethdev: clarify device queue state after start and stop",
        "Date": "Fri, 13 Oct 2023 16:57:23 +0100",
        "Message-ID": "<20231013155723.2631644-1-ferruh.yigit@amd.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20230928205930.2619353-1-ferruh.yigit@amd.com>",
        "References": "<20230928205930.2619353-1-ferruh.yigit@amd.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.180.168.240]",
        "X-ClientProxiedBy": "SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com\n (10.181.40.145)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "SA2PEPF00001509:EE_|PH7PR12MB6587:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "98d011be-3ed4-47ff-6b28-08dbcc052264",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n CTsLK91dgcd5lCbweQuCcGvpv8DtX0ZGiiiLNpyD0hoYvPhGVxt85SdA3BGfkYjS37BK591RteFK05vUbp6juaaUu+QAjB1zwgSuSJyP6WvWpS1KpMvW46FaT8poSO1FwwUZk7yv6LJRChIpwzjuPrBKb4vaVLD3DKmQAWXSSvc6DPLssFbZ70FlEEpOJ1b6id+qeyCQNzUxNEG5cBkD3PQ9hWTVKvsFoDQKKokCCOfmENvJmCMolJrBHXhJ7fvCTszJShMLJEqybQ9G6gVWDJ/LIqwxdjEZc97Jzg65eFe/zyBnPnLlMmBQRsI1QuJWz6vt/oSeddjySkXyB31jWMQeBycEfot5ABjLtDueE0rR8hTAAQIVrPPNI3MCB0zhLjRvyR6QHKrvtEP5uEsRybKKZZBomeAKRs4SYQt1ZyOvM/MCXggnQD95T9cppB7qVPkKlw97szRC6GW66hFFcEiHE9MrTSwVvaZnEomOTw9bs8Xtkjj9g7bAR9MjXt9i4omRJmB9nsWBikQHyQSfL3M2psf+xVMemPJfLjPl8fYN8capw78M2ZgFfrOtn0O9qmD7OuUTViGEI9gnwR38aaUPFWmiMoYM0/jjh/ux5D0IKunrJY2y+y01b4arD+z9zhz7jhU6s8C/ijXpsbvrvq/dv02XPho4YrkZN6VCQ5hIwLJUXBgsf2R2QILbS1QVvyFLYKL7u6dFb0YJaMznrZ84/CxPcvNLF/7F/PFJh0rm26WWM0+Yt9DnxSIFVF+02UZ0GeMh5+BSNpkxRuYJMg==",
        "X-Forefront-Antispam-Report": "CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE;\n SFS:(13230031)(4636009)(136003)(346002)(39860400002)(396003)(376002)(230922051799003)(82310400011)(64100799003)(451199024)(1800799009)(186009)(40470700004)(36840700001)(46966006)(40460700003)(40480700001)(7696005)(478600001)(6666004)(36860700001)(47076005)(86362001)(36756003)(81166007)(356005)(82740400003)(7416002)(2906002)(83380400001)(426003)(336012)(2616005)(16526019)(26005)(1076003)(316002)(70206006)(5660300002)(4326008)(54906003)(110136005)(8676002)(8936002)(70586007)(44832011)(41300700001)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "amd.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "13 Oct 2023 15:57:42.6341 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 98d011be-3ed4-47ff-6b28-08dbcc052264",
        "X-MS-Exchange-CrossTenant-Id": "3dd8961f-e488-4e60-8e11-a82d994e183d",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17];\n Helo=[SATLEXMB04.amd.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n SA2PEPF00001509.namprd04.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PH7PR12MB6587",
        "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": "Drivers start/stop device queues on port start/stop, but not all drivers\nupdate queue state accordingly.\n\nThis becomes more visible if a specific queue stopped explicitly and\nport stopped/started later, in this case although all queues are\nstarted, the state of that specific queue is stopped and it is\nmisleading.\n\nMisrepresentation of queue state became a defect with commit [1] that\ndoes forwarding decision based on queue state and commit [2] that gets\nup to date queue state from ethdev/device before forwarding.\n\n[1]\ncommit 3c4426db54fc (\"app/testpmd: do not poll stopped queues\")\n\n[2]\ncommit 5028f207a4fa (\"app/testpmd: fix secondary process packet forwarding\")\n\nThis patch documents that status of all queues of a device should be\n`RTE_ETH_QUEUE_STATE_STOPPED` after port stop and their status should\nbe`RTE_ETH_QUEUE_STATE_STARTED` after port start.\n\nAlso an unit test added to verify drivers.\n\nSigned-off-by: Ferruh Yigit <ferruh.yigit@amd.com>\n---\nCc: Jie Hai <haijie1@huawei.com>\nCc: Song Jiale <songx.jiale@intel.com>\nCc: Yuan Peng <yuan.peng@intel.com>\nCc: Raslan Darawsheh <rasland@nvidia.com>\nCc: Qiming Yang <qiming.yang@intel.com>\nCc: Ivan Malov <ivan.malov@arknetworks.am>\nCc: Huisong Li <lihuisong@huawei.com>\n\nv1:\n* fix memset\n* remove commented out code\n* update unit test to skip queue state if\n  rte_eth_[rt]x_queue_info_get() is not supported\n\nv2:\n* return test_skipped when there is no port available\n* Syntax fixes\n---\n app/test/meson.build       |   1 +\n app/test/test_ethdev_api.c | 185 +++++++++++++++++++++++++++++++++++++\n lib/ethdev/rte_ethdev.h    |   5 +\n 3 files changed, 191 insertions(+)\n create mode 100644 app/test/test_ethdev_api.c",
    "diff": "diff --git a/app/test/meson.build b/app/test/meson.build\nindex 20a9333c726d..dd0675638b5e 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -68,6 +68,7 @@ source_file_deps = {\n     'test_efd.c': ['efd', 'net'],\n     'test_efd_perf.c': ['efd', 'hash'],\n     'test_errno.c': [],\n+    'test_ethdev_api.c': ['ethdev'],\n     'test_ethdev_link.c': ['ethdev'],\n     'test_event_crypto_adapter.c': ['cryptodev', 'eventdev', 'bus_vdev'],\n     'test_event_eth_rx_adapter.c': ['ethdev', 'eventdev', 'bus_vdev'],\ndiff --git a/app/test/test_ethdev_api.c b/app/test/test_ethdev_api.c\nnew file mode 100644\nindex 000000000000..dc72603d000f\n--- /dev/null\n+++ b/app/test/test_ethdev_api.c\n@@ -0,0 +1,185 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (C) 2023, Advanced Micro Devices, Inc.\n+ */\n+\n+#include <rte_log.h>\n+#include <rte_ethdev.h>\n+\n+#include <rte_test.h>\n+#include \"test.h\"\n+\n+#define NUM_RXQ\t2\n+#define NUM_TXQ\t2\n+#define NUM_RXD 512\n+#define NUM_TXD 512\n+#define NUM_MBUF 1024\n+#define MBUF_CACHE_SIZE 256\n+\n+static int32_t\n+ethdev_api_queue_status(void)\n+{\n+\tstruct rte_eth_dev_info dev_info;\n+\tstruct rte_eth_rxq_info rx_qinfo;\n+\tstruct rte_eth_txq_info tx_qinfo;\n+\tstruct rte_mempool *mbuf_pool;\n+\tstruct rte_eth_conf eth_conf;\n+\tuint16_t port_id;\n+\tint ret;\n+\n+\tif (rte_eth_dev_count_avail() == 0)\n+\t\treturn TEST_SKIPPED;\n+\n+\tmbuf_pool = rte_pktmbuf_pool_create(\"MBUF_POOL\", NUM_MBUF, MBUF_CACHE_SIZE, 0,\n+\t\t\tRTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());\n+\n+\tRTE_ETH_FOREACH_DEV(port_id) {\n+\t\tmemset(&eth_conf, 0, sizeof(eth_conf));\n+\t\tret = rte_eth_dev_configure(port_id, NUM_RXQ, NUM_TXQ, &eth_conf);\n+\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\"Port(%u) failed to configure.\\n\", port_id);\n+\n+\t\t/* RxQ setup */\n+\t\tfor (uint16_t queue_id = 0; queue_id < NUM_RXQ; queue_id++) {\n+\t\t\tret = rte_eth_rx_queue_setup(port_id, queue_id, NUM_RXD,\n+\t\t\t\trte_socket_id(), NULL,  mbuf_pool);\n+\t\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\t\"Port(%u), queue(%u) failed to setup RxQ.\\n\",\n+\t\t\t\tport_id, queue_id);\n+\t\t}\n+\n+\t\t/* TxQ setup */\n+\t\tfor (uint16_t queue_id = 0; queue_id < NUM_TXQ; queue_id++) {\n+\t\t\tret = rte_eth_tx_queue_setup(port_id, queue_id, NUM_TXD,\n+\t\t\t\trte_socket_id(), NULL);\n+\t\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\t\"Port(%u), queue(%u) failed to setup TxQ.\\n\",\n+\t\t\t\tport_id, queue_id);\n+\t\t}\n+\n+\t\tret = rte_eth_dev_info_get(port_id, &dev_info);\n+\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\"Port(%u) failed to get dev info.\\n\", port_id);\n+\n+\t\t/* Initial RxQ */\n+\t\tfor (uint16_t queue_id = 0; queue_id < dev_info.nb_rx_queues; queue_id++) {\n+\t\t\tret = rte_eth_rx_queue_info_get(port_id, queue_id, &rx_qinfo);\n+\t\t\tif (ret == -ENOTSUP)\n+\t\t\t\tcontinue;\n+\n+\t\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\t\"Port(%u), queue(%u) failed to get RxQ info.\\n\",\n+\t\t\t\tport_id, queue_id);\n+\n+\t\t\tTEST_ASSERT(rx_qinfo.queue_state == RTE_ETH_QUEUE_STATE_STOPPED,\n+\t\t\t\t\"Wrong initial Rx queue(%u) state(%d)\\n\",\n+\t\t\t\tqueue_id, rx_qinfo.queue_state);\n+\t\t}\n+\n+\t\t/* Initial TxQ */\n+\t\tfor (uint16_t queue_id = 0; queue_id < dev_info.nb_tx_queues; queue_id++) {\n+\t\t\tret = rte_eth_tx_queue_info_get(port_id, queue_id, &tx_qinfo);\n+\t\t\tif (ret == -ENOTSUP)\n+\t\t\t\tcontinue;\n+\n+\t\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\t\"Port(%u), queue(%u) failed to get TxQ info.\\n\",\n+\t\t\t\tport_id, queue_id);\n+\n+\t\t\tTEST_ASSERT(tx_qinfo.queue_state == RTE_ETH_QUEUE_STATE_STOPPED,\n+\t\t\t\t\"Wrong initial Tx queue(%u) state(%d)\\n\",\n+\t\t\t\tqueue_id, tx_qinfo.queue_state);\n+\t\t}\n+\n+\t\tret = rte_eth_dev_start(port_id);\n+\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\"Port(%u) failed to start.\\n\", port_id);\n+\n+\t\t/* Started RxQ */\n+\t\tfor (uint16_t queue_id = 0; queue_id < dev_info.nb_rx_queues; queue_id++) {\n+\t\t\tret = rte_eth_rx_queue_info_get(port_id, queue_id, &rx_qinfo);\n+\t\t\tif (ret == -ENOTSUP)\n+\t\t\t\tcontinue;\n+\n+\t\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\t\"Port(%u), queue(%u) failed to get RxQ info.\\n\",\n+\t\t\t\tport_id, queue_id);\n+\n+\t\t\tTEST_ASSERT(rx_qinfo.queue_state == RTE_ETH_QUEUE_STATE_STARTED,\n+\t\t\t\t\"Wrong started Rx queue(%u) state(%d)\\n\",\n+\t\t\t\tqueue_id, rx_qinfo.queue_state);\n+\t\t}\n+\n+\t\t/* Started TxQ */\n+\t\tfor (uint16_t queue_id = 0; queue_id < dev_info.nb_tx_queues; queue_id++) {\n+\t\t\tret = rte_eth_tx_queue_info_get(port_id, queue_id, &tx_qinfo);\n+\t\t\tif (ret == -ENOTSUP)\n+\t\t\t\tcontinue;\n+\n+\t\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\t\"Port(%u), queue(%u) failed to get TxQ info.\\n\",\n+\t\t\t\tport_id, queue_id);\n+\n+\t\t\tTEST_ASSERT(tx_qinfo.queue_state == RTE_ETH_QUEUE_STATE_STARTED,\n+\t\t\t\t\"Wrong started Tx queue(%u) state(%d)\\n\",\n+\t\t\t\tqueue_id, tx_qinfo.queue_state);\n+\t\t}\n+\n+\t\tret = rte_eth_dev_stop(port_id);\n+\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\"Port(%u) failed to stop.\\n\", port_id);\n+\n+\t\t/* Stopped RxQ */\n+\t\tfor (uint16_t queue_id = 0; queue_id < dev_info.nb_rx_queues; queue_id++) {\n+\t\t\tret = rte_eth_rx_queue_info_get(port_id, queue_id, &rx_qinfo);\n+\t\t\tif (ret == -ENOTSUP)\n+\t\t\t\tcontinue;\n+\n+\t\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\t\"Port(%u), queue(%u) failed to get RxQ info.\\n\",\n+\t\t\t\tport_id, queue_id);\n+\n+\t\t\tTEST_ASSERT(rx_qinfo.queue_state == RTE_ETH_QUEUE_STATE_STOPPED,\n+\t\t\t\t\"Wrong stopped Rx queue(%u) state(%d)\\n\",\n+\t\t\t\tqueue_id, rx_qinfo.queue_state);\n+\t\t}\n+\n+\t\t/* Stopped TxQ */\n+\t\tfor (uint16_t queue_id = 0; queue_id < dev_info.nb_tx_queues; queue_id++) {\n+\t\t\tret = rte_eth_tx_queue_info_get(port_id, queue_id, &tx_qinfo);\n+\t\t\tif (ret == -ENOTSUP)\n+\t\t\t\tcontinue;\n+\n+\t\t\tTEST_ASSERT(ret == 0,\n+\t\t\t\t\"Port(%u), queue(%u) failed to get TxQ info.\\n\",\n+\t\t\t\tport_id, queue_id);\n+\n+\t\t\tTEST_ASSERT(tx_qinfo.queue_state == RTE_ETH_QUEUE_STATE_STOPPED,\n+\t\t\t\t\"Wrong stopped Tx queue(%u) state(%d)\\n\",\n+\t\t\t\tqueue_id, tx_qinfo.queue_state);\n+\t\t}\n+\t}\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n+static struct unit_test_suite ethdev_api_testsuite = {\n+\t.suite_name = \"ethdev API tests\",\n+\t.setup = NULL,\n+\t.teardown = NULL,\n+\t.unit_test_cases = {\n+\t\tTEST_CASE(ethdev_api_queue_status),\n+\t\t/* TODO: Add deferred_start queue status test */\n+\t\tTEST_CASES_END() /**< NULL terminate unit test array */\n+\t}\n+};\n+\n+static int\n+test_ethdev_api(void)\n+{\n+\trte_log_set_global_level(RTE_LOG_DEBUG);\n+\trte_log_set_level(RTE_LOGTYPE_EAL, RTE_LOG_DEBUG);\n+\n+\treturn unit_test_suite_runner(&ethdev_api_testsuite);\n+}\n+\n+REGISTER_TEST_COMMAND(ethdev_api, test_ethdev_api);\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex f949dfc83dc2..85b9af7a02c0 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -2812,6 +2812,9 @@ int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id);\n  * Device RTE_ETH_DEV_NOLIVE_MAC_ADDR flag causes MAC address to be set before\n  * PMD port start callback function is invoked.\n  *\n+ * All device queues (except form deferred start queues) status should be\n+ * `RTE_ETH_QUEUE_STATE_STARTED` after start.\n+ *\n  * On success, all basic functions exported by the Ethernet API (link status,\n  * receive/transmit, and so on) can be invoked.\n  *\n@@ -2828,6 +2831,8 @@ int rte_eth_dev_start(uint16_t port_id);\n  * Stop an Ethernet device. The device can be restarted with a call to\n  * rte_eth_dev_start()\n  *\n+ * All device queues status should be `RTE_ETH_QUEUE_STATE_STOPPED` after stop.\n+ *\n  * @param port_id\n  *   The port identifier of the Ethernet device.\n  * @return\n",
    "prefixes": [
        "v2"
    ]
}