From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7D9C94265D; Thu, 28 Sep 2023 09:46:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E592402EA; Thu, 28 Sep 2023 09:46:16 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 83B8A40273 for ; Thu, 28 Sep 2023 09:46:14 +0200 (CEST) Received: from kwepemi500020.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Rx55n2c2MztT8R for ; Thu, 28 Sep 2023 15:41:49 +0800 (CST) Received: from localhost.localdomain (10.67.165.2) by kwepemi500020.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Thu, 28 Sep 2023 15:46:11 +0800 From: Jie Hai To: CC: , Subject: [PATCH v2 0/8] fix Rx and Tx queue state Date: Thu, 28 Sep 2023 15:42:57 +0800 Message-ID: <20230928074305.2991100-1-haijie1@huawei.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230908112901.1169869-1-haijie1@huawei.com> References: <20230908112901.1169869-1-haijie1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500020.china.huawei.com (7.221.188.8) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The DPDK framework reports the queue status, which is stored in 'dev->data->tx_queue_state' and 'dev->data->rx_queue_state' . The state is currently maintained by the drivers. Users may determine whether a queue participates in packet forwarding based on the state, For example, [1] 5028f207a4fa ("app/testpmd: fix secondary process packet forwarding" [2] 141a520b35f7 ("app/testpmd: fix primary process not polling all queues") However, not all drivers correctly report the queue status. This may cause forwarding problems. Since it is difficult to modify the queue status of all drivers, we consider updating the queue status at the framework level. Some drivers support queues for hairpin, leaving status updating for such queues to the drivers. Some drivers support deferred_start. Assume that all drivers that support 'deferred_start' can obtain the configuration through 'rte_eth_tx_queue_info_get' and 'rte_eth_rx_queue_info_get'. So we can directly update the queue status in 'rte_eth_dev_start' and 'rte_eth_dev_stop'. This patchset does the follow things: 1. update Rx and Tx queue status in dev_start and dev_stop. 2. implement rxq|txq_info_get ops for drivers supporting deferred start. 3. resubmit the patch [2] and makes some fixes on the patch. Jie Hai (8): lib/ethdev: update Rx and Tx queue status net/cpfl: support getting queue information net/enetc: save deferred start configuratin for queues net/enetc: support getting queue information net/failsafe: support getting queue information net/fm10k: support getting queue information net/idpf: support getting queue information app/testpmd: fix primary process not polling all queues app/test-pmd/testpmd.c | 25 ++++++++++++++---- drivers/net/cpfl/cpfl_ethdev.c | 2 ++ drivers/net/cpfl/cpfl_rxtx.c | 26 +++++++++++++++++++ drivers/net/cpfl/cpfl_rxtx.h | 4 +++ drivers/net/enetc/enetc.h | 2 ++ drivers/net/enetc/enetc_ethdev.c | 26 +++++++++++++++++++ drivers/net/failsafe/failsafe_ops.c | 24 +++++++++++++++++ drivers/net/fm10k/fm10k_ethdev.c | 28 ++++++++++++++++++++ drivers/net/idpf/idpf_ethdev.c | 22 ++++++++++++++++ lib/ethdev/rte_ethdev.c | 40 +++++++++++++++++++++++++++++ 10 files changed, 194 insertions(+), 5 deletions(-) -- 2.30.0