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 9843C4265D; Thu, 28 Sep 2023 09:46:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0662540A79; Thu, 28 Sep 2023 09:46:26 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 8AE9740273 for ; Thu, 28 Sep 2023 09:46:16 +0200 (CEST) Received: from kwepemi500020.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Rx58G2lCMzrSwG for ; Thu, 28 Sep 2023 15:43:58 +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:15 +0800 From: Jie Hai To: , Jingjing Wu , Beilei Xing CC: , Subject: [PATCH v2 7/8] net/idpf: support getting queue information Date: Thu, 28 Sep 2023 15:43:04 +0800 Message-ID: <20230928074305.2991100-8-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/idpf/idpf_ethdev.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c index 3af7cf0bb7e0..c3819e4a863c 100644 --- a/drivers/net/idpf/idpf_ethdev.c +++ b/drivers/net/idpf/idpf_ethdev.c @@ -835,6 +835,26 @@ idpf_dev_close(struct rte_eth_dev *dev) return 0; } +static void +idpf_rxq_info_get(struct rte_eth_dev *dev, uint16_t rx_queue_id, + struct rte_eth_rxq_info *qinfo) +{ + struct idpf_rx_queue *rxq; + + rxq = dev->data->rx_queues[rx_queue_id]; + qinfo->conf.rx_deferred_start = rxq->rx_deferred_start; +} + +static void +idpf_txq_info_get(struct rte_eth_dev *dev, uint16_t tx_queue_id, + struct rte_eth_txq_info *qinfo) +{ + struct idpf_tx_queue *txq; + + txq = dev->data->tx_queues[tx_queue_id]; + qinfo->conf.tx_deferred_start = txq->tx_deferred_start; +} + static const struct eth_dev_ops idpf_eth_dev_ops = { .dev_configure = idpf_dev_configure, .dev_close = idpf_dev_close, @@ -850,6 +870,8 @@ static const struct eth_dev_ops idpf_eth_dev_ops = { .tx_queue_stop = idpf_tx_queue_stop, .rx_queue_release = idpf_dev_rx_queue_release, .tx_queue_release = idpf_dev_tx_queue_release, + .rxq_info_get = idpf_rxq_info_get, + .txq_info_get = idpf_txq_info_get, .mtu_set = idpf_dev_mtu_set, .dev_supported_ptypes_get = idpf_dev_supported_ptypes_get, .stats_get = idpf_dev_stats_get, -- 2.30.0