From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v4 12/22] net/atlantic: device statistics, xstats Date: Wed, 10 Oct 2018 11:27:46 +0100 Message-ID: <05dcec20-aa43-a7cd-9fa6-26c48506020f@intel.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Pavel Belous To: Igor Russkikh , "dev@dpdk.org" Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CC0531B450 for ; Wed, 10 Oct 2018 12:27:51 +0200 (CEST) In-Reply-To: Content-Language: en-US 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 10/9/2018 10:31 AM, Igor Russkikh wrote: > From: Pavel Belous > > Signed-off-by: Igor Russkikh > Signed-off-by: Pavel Belous <...> > +static void > +atl_dev_stats_reset(struct rte_eth_dev *dev) > +{ > + struct aq_hw_s *hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private); > + > + hw->aq_fw_ops->update_stats(hw); > + > + /* Reset software totals */ > + memset(&hw->curr_stats, 0, sizeof(hw->curr_stats)); Where "adapter->sw_stats" reset? <...> > +static void > +atl_dev_xstats_reset(struct rte_eth_dev *dev __rte_unused) > +{ > +} Shouldn't this reset the hw->curr_stats? Instead of implementing this fucntion you can reuse atl_dev_stats_reset() as ".xstats_reset" since it seems there is not specific need for xstats_reset > + > +static int > +atl_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev __rte_unused, > + uint16_t queue_id __rte_unused, > + uint8_t stat_idx __rte_unused, > + uint8_t is_rx __rte_unused) > +{ > + /* The mapping is hardcoded: queue 0 -> stat 0, etc */ > + return 0; > +} No need to add this function if there is no specific mapping requirement.