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 AB140A0487 for ; Mon, 1 Jul 2019 14:57:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B43765F11; Mon, 1 Jul 2019 14:57:00 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id A813B5587 for ; Mon, 1 Jul 2019 14:56:59 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jul 2019 05:56:58 -0700 X-IronPort-AV: E=Sophos;i="5.63,439,1557212400"; d="scan'208";a="174214465" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.51]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jul 2019 05:56:56 -0700 Date: Mon, 1 Jul 2019 13:56:53 +0100 From: Bruce Richardson To: "Pattan, Reshma" Cc: "dev@dpdk.org" , "thomas@monjalon.net" , "jerinj@marvell.com" Message-ID: <20190701125653.GB380@bricha3-MOBL.ger.corp.intel.com> References: <20190530212525.40370-1-bruce.richardson@intel.com> <20190627104055.8244-1-bruce.richardson@intel.com> <20190627104055.8244-8-bruce.richardson@intel.com> <3AEA2BF9852C6F48A459DA490692831F2A4894DC@irsmsx110.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F2A4894DC@irsmsx110.ger.corp.intel.com> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH v3 7/8] raw/ioat: add statistics functions 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" On Mon, Jul 01, 2019 at 11:11:20AM +0100, Pattan, Reshma wrote: > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > > Sent: Thursday, June 27, 2019 11:41 AM > > To: dev@dpdk.org > > > > > > +static int > > +ioat_xstats_get(const struct rte_rawdev *dev, const unsigned int ids[], > > + uint64_t values[], unsigned int n) > > +{ > > + const struct rte_ioat_rawdev *ioat = dev->dev_private; > > + unsigned int i; > > + > > + for (i = 0; i < n; i++) { > > + switch (ids[i]) { > > + case 0: values[i] = ioat->enqueue_failed; break; > > + case 1: values[i] = ioat->enqueued; break; > > + case 2: values[i] = ioat->started; break; > > + case 3: values[i] = ioat->completed; break; > > + default: values[i] = 0; break; > > + } > > + } > > + return n; > > Should this return n or how many actually filled ? > They should both be "n", since we never break out of the loop early. /Bruce