From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14011C433E0 for ; Thu, 18 Mar 2021 07:51:41 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 3719864F10 for ; Thu, 18 Mar 2021 07:51:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3719864F10 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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.