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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 26 Apr 2019 11:50:58 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Igor Russkikh <Igor.Russkikh@...antia.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Nikita Danilov <Nikita.Danilov@...antia.com>,
        Dmitry Bogdanov <Dmitry.Bogdanov@...antia.com>
Subject: Re: [PATCH v3 net-next 12/15] net: aquantia: fetch up to date
 statistics on ethtool request

On Fri, 26 Apr 2019 09:48:07 +0000, Igor Russkikh wrote:
> From: Dmitry Bogdanov <dmitry.bogdanov@...antia.com>
> 
> This improves ethtool -S usage, where stats are now actual
> on each request. Before that stats only were updated at service
> timer period.
> 
> Tested-by: Nikita Danilov <ndanilov@...antia.com>
> Signed-off-by: Igor Russkikh <igor.russkikh@...antia.com>
> Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@...antia.com>
> ---
>  drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
> index 454a44bb148e..1893ba7fcd2b 100644
> --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
> +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
> @@ -700,7 +700,15 @@ void aq_nic_get_stats(struct aq_nic_s *self, u64 *data)
>  	unsigned int i = 0U;
>  	unsigned int count = 0U;
>  	struct aq_vec_s *aq_vec = NULL;
> -	struct aq_stats_s *stats = self->aq_hw_ops->hw_get_hw_stats(self->aq_hw);
> +	struct aq_stats_s *stats;
> +
> +	if (self->aq_fw_ops->update_stats) {
> +		mutex_lock(&self->fwreq_mutex);
> +		self->aq_fw_ops->update_stats(self->aq_hw);
> +		mutex_unlock(&self->fwreq_mutex);
> +	}
> +	stats = self->aq_hw_ops->hw_get_hw_stats(self->aq_hw);
> +
>  

nit: unnecessary empty line here.

BTW the mutex/wq patches look good now, thanks!

>  	if (!stats)
>  		goto err_exit;

Powered by blists - more mailing lists