From: Andrew Lunn <andrew@lunn•ch>
To: Igor Russkikh <igor.russkikh@aquantia•com>
Cc: "David S . Miller" <davem@davemloft•net>,
netdev@vger•kernel.org, David Arcari <darcari@redhat•com>,
Pavel Belous <pavel.belous@aquantia•com>,
Nadezhda Krupnina <Nadezhda.Krupnina@aquantia•com>,
Simon Edelhaus <simon.edelhaus@aquantia•com>
Subject: Re: [PATCH net v2 7/9] net: aquantia: Reset driver level statistics to zero on initialization
Date: Mon, 11 Dec 2017 16:51:56 +0100 [thread overview]
Message-ID: <20171211155156.GK28672@lunn.ch> (raw)
In-Reply-To: <99425adad58a8ed133edc1a2b5ec8fec70e56e36.1512994559.git.igor.russkikh@aquantia.com>
> --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
> +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
> @@ -344,6 +344,13 @@ static int hw_atl_a0_hw_init(struct aq_hw_s *self,
> hw_atl_a0_hw_rss_set(self, &aq_nic_cfg->aq_rss);
> hw_atl_a0_hw_rss_hash_set(self, &aq_nic_cfg->aq_rss);
>
> + /* Read initial hardware counters
> + * and reset current in-driver statistics
> + */
> + hw_atl_utils_update_stats(self);
> + memset(&PHAL_ATLANTIC_A0->curr_stats, 0,
> + sizeof(PHAL_ATLANTIC_A0->curr_stats));
> +
> err = aq_hw_err_from_flags(self);
> if (err < 0)
> goto err_exit;
Hi Igor
It looks like this is called on pm state change? Does this mean that
resume will zero the statistics? That is probably not what you want.
You should probably only clear the statics in the probe function.
Andrew
next prev parent reply other threads:[~2017-12-11 15:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-11 12:16 [PATCH net v2 0/9] net: aquantia: Atlantic driver 12/2017 updates Igor Russkikh
2017-12-11 12:16 ` [PATCH net v2 1/9] net: aquantia: Fix actual speed capabilities reporting Igor Russkikh
2017-12-11 12:16 ` [PATCH net v2 2/9] net: aquantia: Fix hardware DMA stream overload on large MRRS Igor Russkikh
2017-12-11 12:16 ` [PATCH net v2 3/9] net: aquantia: Extend stat counters to 64bit values Igor Russkikh
2017-12-11 12:16 ` [PATCH net v2 4/9] net: aquantia: Fill ndev stat couters from hardware Igor Russkikh
2017-12-11 15:47 ` Andrew Lunn
2017-12-11 12:16 ` [PATCH net v2 5/9] net: aquantia: Fill in multicast counter in ndev stats " Igor Russkikh
2017-12-11 15:46 ` Andrew Lunn
2017-12-11 12:16 ` [PATCH net v2 6/9] net: aquantia: Improve link state and statistics check interval callback Igor Russkikh
2017-12-11 12:16 ` [PATCH net v2 7/9] net: aquantia: Reset driver level statistics to zero on initialization Igor Russkikh
2017-12-11 15:51 ` Andrew Lunn [this message]
2017-12-12 9:46 ` Igor Russkikh
2017-12-11 12:16 ` [PATCH net v2 8/9] net: aquantia: Fix typo in ethtool statistics names Igor Russkikh
2017-12-11 15:45 ` Andrew Lunn
2017-12-11 15:51 ` David Miller
2017-12-11 12:16 ` [PATCH net v2 9/9] net: aquantia: Increment driver version Igor Russkikh
2017-12-11 15:45 ` [PATCH net v2 0/9] net: aquantia: Atlantic driver 12/2017 updates Andrew Lunn
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=20171211155156.GK28672@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=Nadezhda.Krupnina@aquantia$(echo .)com \
--cc=darcari@redhat$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=igor.russkikh@aquantia$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pavel.belous@aquantia$(echo .)com \
--cc=simon.edelhaus@aquantia$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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