From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] i40e: Fix the issue when resetting the stats for i40e, the stats information will be lost before next time getting the stats Date: Mon, 03 Aug 2015 18:48:14 +0200 Message-ID: <4079988.2ivxFWYuMK@xps13> References: <1436422141-29024-1-git-send-email-zhe.tao@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: helin.zhang@intel.com Return-path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id A0310C3BA for ; Mon, 3 Aug 2015 18:49:29 +0200 (CEST) Received: by wicgj17 with SMTP id gj17so113901012wic.1 for ; Mon, 03 Aug 2015 09:49:29 -0700 (PDT) In-Reply-To: <1436422141-29024-1-git-send-email-zhe.tao@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Helin, your review is needed. Please check how to write a simple title. 2015-07-09 14:09, Zhe Tao: > Issue: When calling the reset API to reset all the stats for i40e, > all the stats will be untracked before the next time calling get stats API. > Once calling the get stats API it will show all the stats equal zero. > > Changes: Calling the get stats API in the reset API will force the stats_offset update immediately > > Signed-off-by: Zhe Tao [...] > + > + /* > + * need to read the status one time right after reset the offset_loaded field > + * prevent the stats data loss between the i40e_dev_stats_reset and i40e_dev_stats_get > + */ This comment seems complicated to understand. > + > + i40e_dev_stats_get(dev, &stat);