From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 7FFEC37AF for ; Tue, 3 May 2016 14:23:01 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 03 May 2016 05:22:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,572,1455004800"; d="scan'208";a="96256379" Received: from rhorton-mobl.ger.corp.intel.com (HELO [163.33.230.0]) ([163.33.230.0]) by fmsmga004.fm.intel.com with ESMTP; 03 May 2016 05:22:54 -0700 Message-ID: <5728981D.2020003@intel.com> Date: Tue, 03 May 2016 13:22:53 +0100 From: Remy Horton Organization: Intel Shannon Limited User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "David Harton (dharton)" , "dev@dpdk.org" , Helin Zhang References: <1460731462-21229-1-git-send-email-remy.horton@intel.com> <1460731462-21229-3-git-send-email-remy.horton@intel.com> <34cbe07723f64e9f926666164d9d5319@XCH-RCD-016.cisco.com> In-Reply-To: <34cbe07723f64e9f926666164d9d5319@XCH-RCD-016.cisco.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC PATCH v1 2/3] drivers/net/ixgbe: change xstats to use integers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2016 12:23:01 -0000 On 29/04/2016 14:43, David Harton (dharton) wrote: [..] >> + /* RX Priority Stats */ >> + for (stat = 0; stat < IXGBE_NB_RXQ_PRIO_STATS; stat++) { >> + for (i = 0; i < 8; i++) { > > 8 seems magical. Is there a constant somewhere that can be used? Not that I'm aware of. I've made it a #define as a small cleanup. >> +static int ixgbevf_dev_xstats_names(__rte_unused struct rte_eth_dev *dev, >> + struct rte_eth_xstats_name *ptr_names, __rte_unused unsigned limit) >> +{ >> + unsigned i; >> + >> + if (limit < IXGBEVF_NB_XSTATS) > > Think this check has to be removed since rte_eth_xstats_count() calls with > limit == 0. Well spotted. It should only error-out if ptr_names is non-NULL. As an aside, I am wondering whether getting stats counts should itself be a seperate driver hook. ..Remy