From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1C085A04C5; Sat, 5 Sep 2020 18:51:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EEF302BF1; Sat, 5 Sep 2020 18:51:43 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by dpdk.org (Postfix) with ESMTP id 3EBEE255 for ; Sat, 5 Sep 2020 18:51:42 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id B65BC2A8; Sat, 5 Sep 2020 12:51:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Sat, 05 Sep 2020 12:51:41 -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=fm2; bh= RqAeY6qbUsaxYt3ngx1IBoO+jVRxXBjthbFkGSyR//4=; b=GxUJw7COr+cCsXgG UkmMFNv6llumEjQzPmKBRcTcome5DtbxGcOOFCfl1TynaApjCjkhcTKy2xSqLrCE temmwq9O0G4gR0XStPDUtr3pmJSRUiKe5g0cr/XpbSyTGv8xwZgh/HzEKro8Q+Sb DisYAtd74DRDmY/OGUR3kPKQA87fmM6PGui2YXGlig5okoGAfGp5PelZBZhIquTe Znf13NU0wRQeIrXj8xp9FSp1/xqHdUJWGSOId2DMkAtmxPK4BAWKX4Ew4gp0oLSb CHpbyLzHgx+fHYUmUgpyqSSgeA3eKkwlbB6aiAGWJw04SCrf5nd0SOZFb1XCP9cJ 5YhAgA== 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=fm3; bh=RqAeY6qbUsaxYt3ngx1IBoO+jVRxXBjthbFkGSyR/ /4=; b=kP7y+Az2FaaLBO6EOOUZiOxy01QtwGVm7Xrz49a6hT3b9RW7f3jlOzMV8 Y4hBaxLV4pb6k2Hc7T+RDTZLk84plNImMIFnW7javAvvOc+q0fCL6SPYgcaSwCum OvpdWEnz6Vps4vZNCkLXyKfJ6JpULP2H+wjeVeVopjDFd7T5+e05V8ua5CKAY+M/ ut3ulxkBRYs/dD/NtzVzIyjBbxCdKEhc8/JKP6aU4dwxd969nk+tcObjnuzMfcGe fuep1XMJXPrI/dZzkSO+yb+JaK/nQS2RmzBmc862ZnDUhlE3pIVkNDFELdv8hRiY 97md/lCdrLx80qjIDvG7H/BqQ3p2w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudeghedguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeffvdffjeeuteelfeeileduudeugfetjeelveefkeejfeeigeeh teffvdekfeegudenucffohhmrghinhepughpughkrdhorhhgnecukfhppeejjedrudefge drvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght 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 1F3273061B7F; Sat, 5 Sep 2020 12:51:38 -0400 (EDT) From: Thomas Monjalon To: "Min Hu (Connor)" , Ferruh Yigit Cc: dev@dpdk.org, stephen@networkplumber.org, bruce.richardson@intel.com, Jerin Jacob Kollanukkaran , Andrew Rybchenko , Wenzhuo Lu , Beilei Xing , Bernard Iremonger Date: Sat, 05 Sep 2020 18:51:37 +0200 Message-ID: <2234749.eJnAimVeHj@thomas> In-Reply-To: References: <1598961165-20832-2-git-send-email-humin29@huawei.com> <1599219135-53194-2-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH V2 1/4] ethdev: fix compiling errors for per-queue statistics X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" 04/09/2020 20:31, Ferruh Yigit: > On 9/4/2020 12:32 PM, Min Hu (Connor) wrote: > > From: Huisong Li > > > > Currently, only statistics of rx/tx queues with queue_id less than > > RTE_ETHDEV_QUEUE_STAT_CNTRS can be displayed. If there is a certain > > application scenario that it needs to use 256 or more than 256 queues > > and display all statistics of rx/tx queue. At this moment, we have to > > change the macro to be equaled to the queue number. > > > > However, modifying the macro to be greater than 256 will trigger > > many errors and warnings from test-pmd, PMD driver and librte_ethdev > > during compiling dpdk project. But it is possible and permited that > > rx/tx queue number is greater than 256 and all statistics of rx/tx > > queue need to be displayed. In addition, the data type of rx/tx queue > > number in rte_eth_dev_configure API is 'uint16_t'. So It is unreasonable > > to use the 'uint8_t' type for variables that control which per-queue > > statistics can be displayed. > > > > Fixes: ed30d9b691b2 ("app/testpmd: add stats per queue") > > Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD") > > Fixes: abf7275bbaa2 ("ixgbe: move to drivers/net/") > > Fixes: e6defdfddc3b ("net/igc: enable statistics") > > Fixes: 2265e4b4e84b ("net/octeontx2: add basic stats operation") > > Fixes: 6c3169a3dc04 ("virtio: move to drivers/net/") > > Cc: stable@dpdk.org > > > > Signed-off-by: Huisong Li > > Signed-off-by: Min Hu (Connor) > > Reviewed-by: Wei Hu (Xavier) > > Reviewed-by: Dongdong Liu > > The patch mostly looks good and it enables build with > 'RTE_ETHDEV_QUEUE_STAT_CNTRS' > 256. > Only I put a comment for a testpmd change to enable the "set stat_qmap" command > for map value > 256. > > > BUT there are many things to fix in the queue stats mapping, since you are > already on it can you help on a few things on testpmd related to it, if you have > time for it? > > 1) Getting queue stats shouldn't require stats mapping, it should be controlled > separately. Many PMDs doesn't require/do the stats mapping but they still can > collect the per queue stats, which can be displayed independent from mapping. > > 2) Even you map only one queue, while displaying stats it will display > 'RTE_ETHDEV_QUEUE_STAT_CNTRS' queues, and when that number is high it makes hard > to see the actual interested values. > If there is no mapping, it should display min(number_of_queues, > RTE_ETHDEV_QUEUE_STAT_CNTRS). > If there is mapping it should display queues that mapping done, this may require > adding a new 'active' field to 'struct queue_stats_mappings'. > > 3) Why 'struct queue_stats_mappings' is cache aligned, is it really needed? > > 4) The mapping arrays, 'tx_queue_stats_mappings_array' & > 'rx_queue_stats_mappings_array' are global and their size is based on fixed max > port and queue size assumptions, can those mapping array be done per port and > 'RTE_ETHDEV_QUEUE_STAT_CNTRS' size per port? Yes there are a lot of things to review in this area. For reference, the slides I presented last year: https://www.dpdk.org/wp-content/uploads/sites/35/2019/10/WhichStandard.pdf I think we should fix the xstats name "rx_q%u%s" to "rx_q%u_%s".