From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B38BB5F5F for ; Fri, 16 Mar 2018 18:47:35 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2018 10:47:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,316,1517904000"; d="scan'208";a="212010793" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.62]) ([10.237.221.62]) by fmsmga006.fm.intel.com with ESMTP; 16 Mar 2018 10:47:21 -0700 To: Ravi Kumar , dev@dpdk.org References: <1515145938-97474-1-git-send-email-Ravi1.kumar@amd.com> <1520584954-130575-1-git-send-email-Ravi1.kumar@amd.com> <1520584954-130575-15-git-send-email-Ravi1.kumar@amd.com> From: Ferruh Yigit Message-ID: <0b2e115f-f7a6-0978-55dd-c3845d3c2f91@intel.com> Date: Fri, 16 Mar 2018 17:47:20 +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: <1520584954-130575-15-git-send-email-Ravi1.kumar@amd.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 15/18] net/axgbe: add generic transmit and receive stats support 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: Fri, 16 Mar 2018 17:47:36 -0000 On 3/9/2018 8:42 AM, Ravi Kumar wrote: > Signed-off-by: Ravi Kumar <...> > +static int > +axgbe_dev_stats_get(struct rte_eth_dev *dev, > + struct rte_eth_stats *stats) > +{ > + struct axgbe_rx_queue *rxq; > + struct axgbe_tx_queue *txq; > + unsigned int i; > + > + for (i = 0; i < dev->data->nb_rx_queues; i++) { > + rxq = dev->data->rx_queues[i]; > + stats->q_ipackets[i] = rxq->pkts; > + stats->ipackets += rxq->pkts; > + stats->q_ibytes[i] = rxq->bytes; > + stats->ibytes += rxq->bytes; > + } > + for (i = 0; i < dev->data->nb_tx_queues; i++) { > + txq = dev->data->tx_queues[i]; > + stats->q_opackets[i] = txq->pkts; > + stats->opackets += txq->pkts; > + stats->q_obytes[i] = txq->bytes; > + stats->obytes += txq->bytes; > + } Just as a reminder of imissed and ierror, it is OK if they are not ready to use in this stage. <...>