[dpdk-stable] [dpdk-dev] [PATCH] net/iavf: fix Rx bytes stats

Zhang, Qi Z qi.z.zhang at intel.com
Fri Jul 19 02:17:27 CEST 2019



> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Wednesday, July 17, 2019 12:56 PM
> To: Zhang, Qi Z <qi.z.zhang at intel.com>
> Cc: Wu, Jingjing <jingjing.wu at intel.com>; Lu, Wenzhuo
> <wenzhuo.lu at intel.com>; dev at dpdk.org; stable at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix Rx bytes stats
> 
> On Wed, 17 Jul 2019 12:31:00 +0800
> Qi Zhang <qi.z.zhang at intel.com> wrote:
> 
> > Exclude 4 bytes CRC for rx bytes stats.
> > This also aligned Rx stats calculation with PF.
> >
> > Fixes: f4a41a6953af ("net/avf: support stats")
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
> > ---
> >  drivers/net/iavf/iavf_ethdev.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/iavf/iavf_ethdev.c
> > b/drivers/net/iavf/iavf_ethdev.c index 53dc05c78..fe75e86ab 100644
> > --- a/drivers/net/iavf/iavf_ethdev.c
> > +++ b/drivers/net/iavf/iavf_ethdev.c
> > @@ -1047,6 +1047,7 @@ iavf_dev_stats_get(struct rte_eth_dev *dev,
> struct rte_eth_stats *stats)
> >  		stats->imissed = pstats->rx_discards;
> >  		stats->oerrors = pstats->tx_errors + pstats->tx_discards;
> >  		stats->ibytes = pstats->rx_bytes;
> > +		stats->ibytes -= stats->ipackets * RTE_ETHER_CRC_LEN;
> >  		stats->obytes = pstats->tx_bytes;
> >  	} else {
> >  		PMD_DRV_LOG(ERR, "Get statistics failed");
> 
> Correct, DPDK statistics should not include CRC.
> 
> Acked-by: Stephen Hemminger <stephen at networkplumber.org>

Applied to dpdk-next-net-intel.

Thanks
Qi


More information about the stable mailing list