From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EX13-EDG-OU-001.vmware.com (ex13-edg-ou-001.vmware.com [208.91.0.189]) by dpdk.org (Postfix) with ESMTP id AD956995F for ; Thu, 25 May 2017 22:27:25 +0200 (CEST) Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Thu, 25 May 2017 13:27:17 -0700 Received: from shri-linux.eng.vmware.com (shri-linux.eng.vmware.com [10.33.72.16]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 1565B403A8; Thu, 25 May 2017 13:27:24 -0700 (PDT) Date: Thu, 25 May 2017 13:27:23 -0700 From: Shrikrishna Khare To: Nachi Prachanda CC: Chas Williams III , "dev@dpdk.org" , "skhare@vmware.com" In-Reply-To: <6c785a5767ff466293523fbc88c901f0@Hq1wp-exmb11.corp.brocade.com> Message-ID: References: <1495216560-12920-1-git-send-email-ciwillia@brocade.com> <6c785a5767ff466293523fbc88c901f0@Hq1wp-exmb11.corp.brocade.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Received-SPF: None (EX13-EDG-OU-001.vmware.com: skhare@shri-linux.eng.vmware.com does not designate permitted sender hosts) Subject: Re: [dpdk-dev] [PATCH 1/6] net/vmxnet3: retain counters on restart X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 20:27:26 -0000 On Thu, 25 May 2017, Nachi Prachanda wrote: > > From: Shrikrishna Khare [mailto:skhare@shri-linux.eng.vmware.com] > > Sent: Wednesday, May 24, 2017 2:10 PM > > > > On Fri, 19 May 2017, Charles (Chas) Williams wrote: > > > > > From: Nachiketa Prachanda > > > > > > Most nics like virtio, igb/ixgbe etc. don't reset counters on > > > dev_start and arguably this helps in monitoring the counters across a > > > longer time span with multiple device start/stops. > > > vmxnet3 behavior is opposite to that and counters are reset by the > > > host side implementation each time the device is restarted. > > > > > > Change the driver to save the counters in its private context before > > > it is reset by writing CMD_ACTIVATE to REG_CMD. > > > > > > Signed-off-by: Nachiketa Prachanda > > > > This won't be able to deal with vMotion or suspend/resume? > > Correct - this can't deal with the VM suspend/resume unless hypervisor maintains the counter. But this patch doesn't make that behavior any worse than what it was before. The current code always resets stats, but am concerned that this patch will make the behavior inconsistent for cases like suspend/resume. Wondering if this will be better handled by the device emulation instead of the driver (for igb/ixgbe, is this handled by the hardware?). If we were to handle this in the device emulation, what would be the goals/requirements: - device start/stop should not reset stats? - any other operations where we would like to maintain/reset stats? - what might be the expectation around how accurate the stats need to be? - any other requirement on the device? Also, note that if we proceed with this patch, and later extend device support to not reset stats, driver with this patch running on the extended device will report incorrect stats. Thanks, Shri