From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 02/10] ethdev: update xstats_get() strings and Q handling Date: Mon, 02 Nov 2015 17:23:09 +0100 Message-ID: <2410133.CmQNrNzvTz@xps13> References: <1445528914-27636-2-git-send-email-harry.van.haaren@intel.com> <1625667.g6rLv7AGl4@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Van Haaren, Harry" Return-path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id BC0EC8E7E for ; Mon, 2 Nov 2015 17:24:20 +0100 (CET) Received: by wmeg8 with SMTP id g8so65222748wme.1 for ; Mon, 02 Nov 2015 08:24:20 -0800 (PST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2015-11-02 10:17, Van Haaren, Harry: > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > Sent: Monday, November 2, 2015 7:59 AM > > > + /* if xstats_get() is implemented by the PMD, the Q stats are done */ > > > + if (dev->dev_ops->xstats_get != NULL) > > > + return count + xcount; > > > + > > > /* per-rxq stats */ > > > for (q = 0; q < dev->data->nb_rx_queues; q++) { > > > for (i = 0; i < RTE_NB_RXQ_STATS; i++) { > > > > Please could you explain why the generic per-queue stats are not used when > > xstats is implemented in the driver? > > Each PMD exposes its own queue stats so it has the flexibility of presenting them exactly has the hardware counts, in a human-readable order. > > If the generic xstats were used, testpmd> xstats output would split a single queue's xstats to two places in the list. As stats are used during debugging, readability and clarity of the stats is vital in my opinion. Output control is the role of testpmd, not the driver. I think you can reorder the stats in testpmd given that you have defined a clear scheme naming (thanks).