lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 12 Dec 2017 12:46:42 +0300
From:   Igor Russkikh <igor.russkikh@...antia.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        David Arcari <darcari@...hat.com>,
        Pavel Belous <pavel.belous@...antia.com>,
        Nadezhda Krupnina <Nadezhda.Krupnina@...antia.com>,
        Simon Edelhaus <simon.edelhaus@...antia.com>
Subject: Re: [PATCH net v2 7/9] net: aquantia: Reset driver level statistics
 to zero on initialization


>> --- 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.
>
Hi Andrew, thanks for the review. It seems you are right and this'll reset stats on PM state. I'll revalidate this
and come back with updated patch.

BR, Igor

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ