From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 64EA81B6DE for ; Tue, 6 Feb 2018 18:42:22 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2018 09:42:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,469,1511856000"; d="scan'208";a="25328265" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.91]) ([10.237.220.91]) by FMSMGA003.fm.intel.com with ESMTP; 06 Feb 2018 09:42:19 -0800 To: Bruce Richardson , thomas@monjalon.net Cc: dev@dpdk.org References: <20180206160659.87323-1-bruce.richardson@intel.com> From: Ferruh Yigit Message-ID: Date: Tue, 6 Feb 2018 17:42:19 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180206160659.87323-1-bruce.richardson@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] ether: fix incorrect stats query for lowest xstat id 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: , X-List-Received-Date: Tue, 06 Feb 2018 17:42:22 -0000 On 2/6/2018 4:06 PM, Bruce Richardson wrote: > When querying either the name or the value of a stat using the xstats > APIs, a check is done to see if the regular stats API or the xstats APIs > for the driver need to be used. However, the id of the stat requested is > checked to see if it is greater than the number of basic stats, rather > than checking for greater-or-equal, meaning that the xstat with the lowest > id gets incorrectly treated as a basic stat. > > This problem manifests itself when you call proc_info using "--xstats-id" > for the first xstat, you get no name of the stat printed, and a random(ish) > stat value. > > Fixes: 4773152f850b ("ethdev: optimize xstats by ids APIs") > > Signed-off-by: Bruce Richardson Reviewed-by: Ferruh Yigit