[dpdk-dev] [PATCH v3 1/2] net/vhost: add a new stats struct

Yang, Zhiyong zhiyong.yang at intel.com
Wed Sep 21 07:12:30 CEST 2016


> -----Original Message-----
> From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com]
> Sent: Tuesday, September 20, 2016 6:44 PM
> To: Yang, Zhiyong <zhiyong.yang at intel.com>
> Cc: dev at dpdk.org; thomas.monjalon at 6wind.com; pmatilai at redhat.com;
> Van Haaren, Harry <harry.van.haaren at intel.com>
> Subject: Re: [PATCH v3 1/2] net/vhost: add a new stats struct
> 
> On Tue, Sep 20, 2016 at 05:36:44PM +0800, Zhiyong Yang wrote:
> > The patch moves all stats counters to a new defined struct vhost_stats
> > as follows, in order to manage all stats counters in a unified way and
> > simplify the subsequent function
> implementation(vhost_dev_xstats_reset).
> >
> > struct vhost_stats {
> > 	uint64_t rx_pkts;
> > 	uint64_t tx_pkts;
> 
> As I mentioned in last review (you may not notice it though), there is no
> need to introduce rx_pkts and tx_pkts: only one of them will be used for a
> specific queue. You could just use "pkts".
> 
> 
> > 	uint64_t missed_pkts;
> > 	uint64_t rx_bytes;
> > 	uint64_t tx_bytes;
> 
> Ditto.

Ok. You are right.  The definition after modification will be :
struct vhost_stats {
	uint64_t pkts;
	uint64_t bytes;
	uint64_t missed_pkts;
};

> 
> 	--yliu




More information about the dev mailing list