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 D19C8A00C2; Wed, 17 Mar 2021 13:07:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D1764069F; Wed, 17 Mar 2021 13:07:36 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id D01D840687 for ; Wed, 17 Mar 2021 13:07:34 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id EFD4D5C010E; Wed, 17 Mar 2021 08:07:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 17 Mar 2021 08:07:33 -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= GdSIFPY2bBRyf81T9skmf0eICdeYJ7OsXNnrUFAg7ZM=; b=EKh08cBGm2OuJctp TEJmKsgOy/Oejjaf32VTe+eZ/Ikev/sRo6jQ/f2gmXApS5xauVUmGhCHvk9m7rbX 9gEwrCDME62E45I+eGaggnGNjBuDbZz99RlQ3as19L8trQHW18M+RNq1vWjK34zH VOZfDhjdStLT0FXy3suEOOVcOElh498t7wpfgTsaAG459NHTIgigh0ghco7vW5K2 1DXtKBeMAzlT7TJYMniEimZPKOu1v/jSbWb1OKWkXcbpN99aFvbEjvFlRq5RQEcj 6kOTdQrmRfyhity1oOSs53QyRkX7g0ihT5S1yW+JF+APkE2y3/13fmvnc+EVOwcn B4vLBw== 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=GdSIFPY2bBRyf81T9skmf0eICdeYJ7OsXNnrUFAg7 ZM=; b=RMvESS12CD0Gdt9z69Bx1EyPkA1RDvga6FcCQSDrEFnNQNowAmKr3Mduf 0WpYm1lJ5Hj8HmnmkQBzCyX2jOyhceabyLRwhdIBDQxokT1ho25nQbXPTLUX7cGd x7nK16H5to+Qq1F2+aZjXVSJZH/K9mPNzXB1YfvUP2CjD6x0V1fHI8HB4K0vKfVw J6sdXkvjmA2GW9jA7Ace3AECN0NE9yDLxit/2VZG5eWxCE/uOYMJmqm4BWWrPBkO oKCioshqwkYoTNbYpxm9shYharnNVhPiuoY2vl2L59VzB8UqlPW0n6dTHmZ+rkuf wvfPmHbSXKywvTJSRzwHTBmzxyeQg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudefgedgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkjghfggfgtgesthfure dttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedugefgvdefudfftdefge elgffhueekgfffhfeujedtteeutdejueeiiedvffegheenucfkphepjeejrddufeegrddv tdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth 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 5721C24005C; Wed, 17 Mar 2021 08:07:32 -0400 (EDT) From: Thomas Monjalon To: oulijun Cc: linuxarm@openeuler.org, dev , ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru Date: Wed, 17 Mar 2021 13:07:30 +0100 Message-ID: <2205707.nYbv8Qi5Wc@thomas> In-Reply-To: References: <1614929583-37727-1-git-send-email-oulijun@huawei.com> <13135629.FDAB5nOBdD@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 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.