From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by dpdk.org (Postfix) with ESMTP id B0995379E for ; Mon, 23 Mar 2015 08:20:56 +0100 (CET) Received: by obdfc2 with SMTP id fc2so116897171obd.3 for ; Mon, 23 Mar 2015 00:20:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Qpe1HFWXUFTtYDMlqai1hAtd9RzyVCJqJKstRU5EZ1I=; b=fmhAhOiubSMk6FMuAjPgVsaAvHZ31rANxQnVSYit5ESOZBJ38jrQG+jtvg5bpGAsLU cuzY5591m/YqfGG8MOsFodS8/BkGN6yng/CjG63Oa989bkPjcRRsC7y9BVo/nQf7ugAA 2OeaPuOI/M8jNect1XSWmyt5OEW3xPC8/5T5xIAaaB1GjzzRV2tsL/fEYE3VcYW5Cge5 hZyPaToeQkh7ovkCfFdNSThUsaNnQqYLo+uSYawg1GZLRjnG29vKJpSCntRHpcITDblc jPZMQgTi62Kc9avye6ftchwTO7/f2J/K8l9lSTXMwz/IZIVHvANsPawt1bbCQnA4PlCG rSRQ== X-Gm-Message-State: ALoCoQmqJUrLnaLtcpmwSgpeXkuzlSrRm8D4y9f5Ox23CErAIONWPRX8sYxMMKLqGefDHCq2HEUw MIME-Version: 1.0 X-Received: by 10.202.108.84 with SMTP id h81mr30059233oic.90.1427095256050; Mon, 23 Mar 2015 00:20:56 -0700 (PDT) Received: by 10.76.34.35 with HTTP; Mon, 23 Mar 2015 00:20:55 -0700 (PDT) In-Reply-To: <1427093798-23078-1-git-send-email-changchun.ouyang@intel.com> References: <1427093798-23078-1-git-send-email-changchun.ouyang@intel.com> Date: Mon, 23 Mar 2015 08:20:55 +0100 Message-ID: From: David Marchand To: Ouyang Changchun Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] virtio: Fix stats issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 07:20:57 -0000 Hello, Hello, On Mon, Mar 23, 2015 at 7:56 AM, Ouyang Changchun < changchun.ouyang@intel.com> wrote: > It need clear/reset the stats information before count in all queues data. > > Signed-off-by: Changchun Ouyang > --- > 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