[dpdk-dev] [PATCH v3] net/vhost: fix xstats wrong after clearing stats

Maxime Coquelin maxime.coquelin at redhat.com
Fri Oct 23 12:54:13 CEST 2020



On 10/15/20 7:49 PM, David Christensen wrote:
> The PMD API allows stats and xstats values to be cleared separately.
> This is a problem for the vhost PMD since some of the xstats values are
> derived from existing stats values.  For example:
> 
> testpmd> show port xstats all
> ...
> tx_unicast_packets: 17562959
> ...
> testpmd> clear port stats all
> ...
> show port xstats all
> ...
> tx_unicast_packets: 18446744073709551615
> ...
> 
> Modify the driver so that stats and xstats values are stored, updated,
> and cleared separately.
> 
> Fixes: 4d6cf2ac93dc ("net/vhost: add extended statistics")
> Cc: stable at dpdk.org
> 
> Signed-off-by: David Christensen <drc at linux.vnet.ibm.com>
> ---
> v3:
> * Modified comment that unicast packets include unsent packets
> * Change Cc: to stable at dpdk.org
> v2:
> * Removed newly unused vq loops
> * Added "fixes" message
> * Renamed vhost_count_multicast_broadcast to vhost_count_xcast_packets
> 
>  drivers/net/vhost/rte_eth_vhost.c | 76 +++++++++++++++----------------
>  1 file changed, 38 insertions(+), 38 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime



More information about the dev mailing list