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 80E83A0561; Thu, 18 Mar 2021 08:51:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10FE0406B4; Thu, 18 Mar 2021 08:51:39 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 5CDF740698 for ; Thu, 18 Mar 2021 08:51:38 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 073505C0099; Thu, 18 Mar 2021 03:51:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 18 Mar 2021 03:51:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= /F09lkJ72o1AhU7q/1Zeoun3GMPAFMdat7XpXXX7E44=; b=JXLIbL/RmIqXyY5X f3IgHXqz4fL7BKPSSp6ExOH9406WEJM9ztm2CBIszwbKr+uCge7I04XpwRqH5myR kcjAVVIKbYIqO1x4gt9u+fmdfAbqDznHFTHFwW5uaysbSf92YDQuf2a4Q+o8jrAf j5Yh/jAUAEXMlmdrYkp5KRQ5DZaHG/AqAHuw1tNA96skkL5W32wNzEQ9BhFbLrRD JYIk7p/7lmNBaw1Ha1wTMkxtIESLubuMMwKMwEzfRSkj3ZOLhEtVL7wGw1TYG2VO DBWqbEAD5RELPuGphQ1yPmvxMA8YTAAEvHI59jmHDs8wHELWJqW2tGpYVWRtEfzf SFenkw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=/F09lkJ72o1AhU7q/1Zeoun3GMPAFMdat7XpXXX7E 44=; b=H8bzCeApjWj388QbmJ3mCTQjvxRr5i2NDxB9fhcJh9Rb7moIgWBUp9lyK VBp7x6WU0UziOtWesgJ0FvGUfK5UteNMR5tBwPSAtLBEWrK+aYy2E5L7Tl67qZmy GuuxNfKlNkKZ4M6n8I3xfxoOMUbXR6hVMUp2toA1rdIxlqAsgMqPUBeld1U9VmRv opNqbcMOZLBujW+cL7TrcalnUz/CYuwOc/rle3SUnePbAXQli7kz0j05A9TtavLM 284E+BR59ZkGltGvFJeTByIjjwTX0IySgLMkIQd406WIozJyU9jiixcwcvjz6usF +CamlS65xccaIJ9Vmury6n+AbQ+Lw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudefhedgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgjfhgggfgtsehtqh ertddttdejnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghs sehmohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepkeethedtieevhfeige ejleegudefjeehkeekteeuveeiuedvveeutdejveehveetnecukfhppeejjedrudefgedr vddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 9A86824005A; Thu, 18 Mar 2021 03:51:36 -0400 (EDT) From: Thomas Monjalon To: oulijun Cc: linuxarm@openeuler.org, dev , ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru Date: Thu, 18 Mar 2021 08:51:35 +0100 Message-ID: <1850123.y4ej15ggrQ@thomas> In-Reply-To: References: <1614929583-37727-1-git-send-email-oulijun@huawei.com> <2205707.nYbv8Qi5Wc@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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" 18/03/2021 04:56, oulijun: > =E5=9C=A8 2021/3/17 20:07, Thomas Monjalon =E5=86=99=E9=81=93: > > 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 nee= d 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? > >=20 > > 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? You can try.