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 60753A0561; Thu, 18 Mar 2021 04:56:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D76FF141012; Thu, 18 Mar 2021 04:56:34 +0100 (CET) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by mails.dpdk.org (Postfix) with ESMTP id CAC47406B4 for ; Thu, 18 Mar 2021 04:56:33 +0100 (CET) Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4F1Cp66ZsTz90RT; Thu, 18 Mar 2021 11:54:38 +0800 (CST) Received: from [10.78.49.194] (10.78.49.194) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Thu, 18 Mar 2021 11:56:27 +0800 To: Thomas Monjalon CC: , dev , , References: <1614929583-37727-1-git-send-email-oulijun@huawei.com> <13135629.FDAB5nOBdD@thomas> <2205707.nYbv8Qi5Wc@thomas> From: oulijun Message-ID: Date: Thu, 18 Mar 2021 11:56:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <2205707.nYbv8Qi5Wc@thomas> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.78.49.194] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [Linuxarm] Re: [PATCH V2] app/testpmd: support Tx mbuf free on demand cmd 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 Sender: "dev" ÔÚ 2021/3/17 20:07, Thomas Monjalon дµÀ: > 17/03/2021 12:30, oulijun: >> 2021/3/12 19:21, Thomas Monjalon: >>> 12/03/2021 11:29, oulijun: >>>> 2021/3/10 15:59, Thomas Monjalon: >>>>> 10/03/2021 02:48, oulijun: >>>>>> Can we add an API such as rte_eth_get_device(pord_id) >>>>>> >>>>>> for example: >>>>>> struct rte_eth_dev * >>>>>> rte_eth_get_device(uint16_t port_id) >>>>>> { >>>>>> return &rte_eth_devices[port_id]; >>>>>> } >>>>> An application is not supposed to access the struct rte_eth_dev. >>>>> Which info do you need from this struct? >>>> >>>> Applications cannot directly access the global variable >>>> rte_eth_devices[]. To obtain information about rte_eth_dev, they need to >>>> access the global variable through APIs instead of directly. >>> >>> That's not the question. >>> Which device info do you need, which is not already provided by >>> one of the function rte_eth_*info* ? >>> rte_eth_dev_get_dcb_info >>> rte_eth_dev_get_reg_info >>> rte_eth_dev_info_get >>> rte_eth_rx_queue_info_get >>> rte_eth_tx_queue_info_get >>> rte_eth_dev_get_module_info >>> >> Hi, Thomas >> I think dev->data->nb_tx_queues can be obtained through >> rte_eth_info_get, but dev->data->tx_queue_state[queue_id] has nowhere to >> be obtained. I think a patch needs to be added to obtain >> tx_queue_state[queue_id] through rte_eth_tx_queue_info_get. What do you >> think? > > Yes it looks OK to add more queue info in rte_eth_*x_queue_info_get. Good, can I just catch up with this version? > > > . >