[dpdk-dev] [PATCH] virtio: Fix stats issue
David Marchand
david.marchand at 6wind.com
Mon Mar 23 08:20:55 CET 2015
Hello,
Hello,
On Mon, Mar 23, 2015 at 7:56 AM, Ouyang Changchun <
changchun.ouyang at intel.com> wrote:
> It need clear/reset the stats information before count in all queues data.
>
> Signed-off-by: Changchun Ouyang <changchun.ouyang at intel.com>
> ---
> lib/librte_pmd_virtio/virtio_ethdev.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c
> b/lib/librte_pmd_virtio/virtio_ethdev.c
> index 603be2d..e4cb55e 100644
> --- a/lib/librte_pmd_virtio/virtio_ethdev.c
> +++ b/lib/librte_pmd_virtio/virtio_ethdev.c
> @@ -572,6 +572,10 @@ virtio_dev_stats_get(struct rte_eth_dev *dev, struct
> rte_eth_stats *stats)
> {
> unsigned i;
>
> + stats->opackets = 0;
> + stats->obytes = 0;
> + stats->oerrors = 0;
>
stats are supposed to be zero'd in generic rte_ethdev.c before this pmd
function is called, so this patch seems useless to me.
Can you give some context ?
Same comment for the i* part.
--
David Marchand
More information about the dev
mailing list