From: Nachi Prachanda <nprachan@Brocade.com>
To: "skhare@vmware.com" <skhare@vmware.com>
Cc: Chas Williams III <ciwillia@Brocade.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/6] net/vmxnet3: retain counters on restart
Date: Thu, 25 May 2017 22:08:07 +0000 [thread overview]
Message-ID: <d9c9fd6c04f7430f9bfab3168a633b2b@Hq1wp-exmb11.corp.brocade.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1705251319360.5989@shri-linux.eng.vmware.com>
> From: Shrikrishna Khare [mailto:skhare@shri-linux.eng.vmware.com]
> Sent: Thursday, May 25, 2017 1:27 PM
>
> 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 <nprachan@brocade.com>
> > > >
> > > > 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 <nprachan@brocade.com>
> > >
> > > 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?).
A little more nuanced.. - see below.
> 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?
I haven't thought about dealing it at the emulation layer - but the expectation
would be not clear counters not cleared for the lifetime of the device - and have
a way to clear them from the driver when needed.
don't know if there is a standard behavior about resetting counters. But
for igb/ixgb the counters are read/clear registers and they are maintained
at driver. May not be always accurate if the hardware is reset without updating
the driver's counter - but at least ensures that it is monotonically increasing since
on each read driver only gets the delta.
virtio emulation doesn't provide the counters - mostly the receive/send functions
updates the counters.
>
> 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.
Agree - it will need some work if the emulation changes.
Regards,
Nachi
> Thanks,
> Shri
next prev parent reply other threads:[~2017-05-25 22:08 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 17:55 Charles (Chas) Williams
2017-05-19 17:55 ` [dpdk-dev] [PATCH 2/6] net/vmxnet3: Implement retrieval of extended stats Charles (Chas) Williams
2017-05-24 0:17 ` Shrikrishna Khare
2017-05-19 17:55 ` [dpdk-dev] [PATCH 3/6] net/vmxnet3: Generate link-state change notifications Charles (Chas) Williams
2017-05-19 17:55 ` [dpdk-dev] [PATCH 4/6] net/vmxnet3: Make vmxnet3_process_events less noisy Charles (Chas) Williams
2017-05-23 21:44 ` Shrikrishna Khare
2017-05-19 17:55 ` [dpdk-dev] [PATCH 5/6] net/vmxnet3: receive queue lockup and memleak Charles (Chas) Williams
2017-06-01 12:24 ` Charles (Chas) Williams
2017-05-24 21:09 ` [dpdk-dev] [PATCH 1/6] net/vmxnet3: retain counters on restart Shrikrishna Khare
2017-05-25 18:31 ` Nachi Prachanda
2017-05-25 20:27 ` Shrikrishna Khare
2017-05-25 22:08 ` Nachi Prachanda [this message]
2017-05-26 17:29 ` Shrikrishna Khare
2017-05-26 19:01 ` Nachi Prachanda
2017-05-26 17:31 ` Shrikrishna Khare
2017-06-15 12:16 ` [dpdk-dev] [PATCH V2 0/6] some local vmxnet3 patches Charles (Chas) Williams
2017-06-15 12:16 ` [dpdk-dev] [PATCH v2 1/6] net/vmxnet3: retain counters on restart Charles (Chas) Williams
2017-06-15 12:16 ` [dpdk-dev] [PATCH v2 2/6] net/vmxnet3: Implement retrieval of extended stats Charles (Chas) Williams
2017-06-21 1:42 ` Shrikrishna Khare
2017-06-15 12:16 ` [dpdk-dev] [PATCH v2 3/6] net/vmxnet3: Generate link-state change notifications Charles (Chas) Williams
2017-06-27 13:52 ` Ferruh Yigit
2017-06-15 12:16 ` [dpdk-dev] [PATCH v2 4/6] net/vmxnet3: Make vmxnet3_process_events less noisy Charles (Chas) Williams
2017-06-28 11:30 ` [dpdk-dev] [PATCH V2 0/6] some local vmxnet3 patches Ferruh Yigit
2017-06-28 12:52 ` Ferruh Yigit
2017-06-28 13:09 ` Charles (Chas) Williams
2017-06-28 17:15 ` Charles (Chas) Williams
2017-06-28 17:54 ` Ferruh Yigit
2017-06-15 12:17 ` [dpdk-dev] [PATCH v2 5/6] net/vmxnet3: receive queue memory leak Charles (Chas) Williams
2017-06-23 23:00 ` Shrikrishna Khare
2017-06-15 12:17 ` [dpdk-dev] [PATCH v2 6/6] net/vmxnet3: preserve configured MAC address Charles (Chas) Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d9c9fd6c04f7430f9bfab3168a633b2b@Hq1wp-exmb11.corp.brocade.com \
--to=nprachan@brocade.com \
--cc=ciwillia@Brocade.com \
--cc=dev@dpdk.org \
--cc=skhare@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).