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]
Message-ID: <20200908122440.580c0a10@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Tue, 8 Sep 2020 12:24:40 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     David Awogbemila <awogbemila@...gle.com>
Cc:     netdev@...r.kernel.org, Kuo Zhao <kuozhao@...gle.com>,
        Yangchun Fu <yangchun@...gle.com>
Subject: Re: [PATCH net-next v3 5/9] gve: Add Gvnic stats AQ command and
 ethtool show/set-priv-flags.

On Tue,  8 Sep 2020 11:39:05 -0700 David Awogbemila wrote:
> +	/* Only one priv flag exists: report-stats (BIT(0))*/
> +	if (flags & BIT(0))
> +		new_flags |= BIT(0);
> +	else
> +		new_flags &= ~(BIT(0));
> +	priv->ethtool_flags = new_flags;
> +	/* update the stats when user turns report-stats on */
> +	if (flags & BIT(0))
> +		gve_handle_report_stats(priv);
> +	/* zero off gve stats when report-stats turned off */
> +	if (!(flags & BIT(0)) && (ori_flags & BIT(0))) {
> +		int tx_stats_num = GVE_TX_STATS_REPORT_NUM *
> +			priv->tx_cfg.num_queues;
> +		int rx_stats_num = GVE_RX_STATS_REPORT_NUM *
> +			priv->rx_cfg.num_queues;
> +
> +		memset(priv->stats_report->stats, 0, (tx_stats_num + rx_stats_num) *
> +				   sizeof(struct stats));
> +	}

I don't understand why you don't cancel/start the timer when this flag
is changed. Why waste the CPU cycles on handling a useless timer?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ