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 9DF2F4265D; Thu, 28 Sep 2023 09:46:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A71CE40273; Thu, 28 Sep 2023 09:46:17 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 72A4E40296 for ; Thu, 28 Sep 2023 09:46:15 +0200 (CEST) Received: from kwepemi500020.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Rx58F6TKQz15NS9; Thu, 28 Sep 2023 15:43:57 +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:13 +0800 From: Jie Hai To: , Gagandeep Singh , Sachin Saxena CC: , Subject: [PATCH v2 4/8] net/enetc: support getting queue information Date: Thu, 28 Sep 2023 15:43:01 +0800 Message-ID: <20230928074305.2991100-5-haijie1@huawei.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230928074305.2991100-1-haijie1@huawei.com> References: <20230908112901.1169869-1-haijie1@huawei.com> <20230928074305.2991100-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 This patch adds support for querying Rx/Tx queue information. Signed-off-by: Jie Hai --- drivers/net/enetc/enetc_ethdev.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c index 444792b7f77e..07ee07c4d5d8 100644 --- a/drivers/net/enetc/enetc_ethdev.c +++ b/drivers/net/enetc/enetc_ethdev.c @@ -828,6 +828,26 @@ enetc_tx_queue_stop(struct rte_eth_dev *dev, uint16_t qidx) return 0; } +static void +enetc_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, + struct rte_eth_rxq_info *qinfo) +{ + struct enetc_bdr *rx_ring; + + rx_ring = dev->data->rx_queues[queue_id]; + qinfo->conf.rx_deferred_start = rx_ring->rx_deferred_start; +} + +static void +enetc_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, + struct rte_eth_txq_info *qinfo) +{ + struct enetc_bdr *tx_ring; + + tx_ring = dev->data->tx_queues[queue_id]; + qinfo->conf.tx_deferred_start = tx_ring->tx_deferred_start; +} + /* * The set of PCI devices this driver supports */ @@ -856,10 +876,12 @@ static const struct eth_dev_ops enetc_ops = { .rx_queue_start = enetc_rx_queue_start, .rx_queue_stop = enetc_rx_queue_stop, .rx_queue_release = enetc_rx_queue_release, + .rxq_info_get = enetc_rxq_info_get, .tx_queue_setup = enetc_tx_queue_setup, .tx_queue_start = enetc_tx_queue_start, .tx_queue_stop = enetc_tx_queue_stop, .tx_queue_release = enetc_tx_queue_release, + .txq_info_get = enetc_txq_info_get, .dev_supported_ptypes_get = enetc_supported_ptypes_get, }; -- 2.30.0