[dpdk-dev] [PATCH v3 03/11] ethdev: update xstats_get() strings and Q handling

Tahhan, Maryam maryam.tahhan at intel.com
Fri Oct 23 17:28:31 CEST 2015


> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Tahhan, Maryam
> Sent: Friday, October 23, 2015 3:35 PM
> To: Van Haaren, Harry <harry.van.haaren at intel.com>; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 03/11] ethdev: update xstats_get() strings
> and Q handling
> 
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Harry van Haaren
> > Sent: Thursday, October 22, 2015 4:48 PM
> > To: dev at dpdk.org
> > Subject: [dpdk-dev] [PATCH v3 03/11] ethdev: update xstats_get()
> > strings and Q handling
> >
> > Update the strings used for presenting stats to adhere to the scheme
> > previously presented. Updated xstats_get() function to handle Q
> > information only if xstats() is not implemented in the PMD, providing
> > the PMD with the needed flexibility to expose its extended Q stats.
> >
> > Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
> > ---
> >  lib/librte_ether/rte_ethdev.c | 38
> > +++++++++++++++++++++++---------------
> >  1 file changed, 23 insertions(+), 15 deletions(-)
> >
> > diff --git a/lib/librte_ether/rte_ethdev.c
> > b/lib/librte_ether/rte_ethdev.c index f593f6e..07f0c26 100644
> > --- a/lib/librte_ether/rte_ethdev.c
> > +++ b/lib/librte_ether/rte_ethdev.c
> > @@ -137,27 +137,30 @@ struct rte_eth_xstats_name_off {  };
> >
> >  static const struct rte_eth_xstats_name_off rte_stats_strings[] = {
> > -	{"rx_packets", offsetof(struct rte_eth_stats, ipackets)},
> > -	{"tx_packets", offsetof(struct rte_eth_stats, opackets)},
> > -	{"rx_bytes", offsetof(struct rte_eth_stats, ibytes)},
> > -	{"tx_bytes", offsetof(struct rte_eth_stats, obytes)},
> > -	{"tx_errors", offsetof(struct rte_eth_stats, oerrors)},
> > +	{"rx_good_packets", offsetof(struct rte_eth_stats, ipackets)},
> > +	{"tx_good_packets", offsetof(struct rte_eth_stats, opackets)},
> > +	{"rx_good_bytes", offsetof(struct rte_eth_stats, ibytes)},
> > +	{"tx_good_bytes", offsetof(struct rte_eth_stats, obytes)},
> 
> Hi Harry
> If there are any apps today scraping the existing stats this will cause an issue.
> I think the "good" description breaks the meaning of the various stats defined
> in the header. For example rx_packets is Total number of successfully
> received packets rather than the "good" packets.
> 
> BR
> Maryam
> >  	{"rx_errors", offsetof(struct rte_eth_stats, ierrors)},

My bad, was quoting the wrong stats register... I'm happy with this change

<snip>


More information about the dev mailing list