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]
Message-ID:
 <DM6PR12MB553455E2ABC9C8FFE2D324B1C7222@DM6PR12MB5534.namprd12.prod.outlook.com>
Date: Tue, 5 Mar 2024 20:40:11 +0000
From: David Thompson <davthompson@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Asmaa Mnebhi
	<asmaa@...dia.com>
Subject: RE: [PATCH net-next v1] mlxbf_gige: add support to display pause
 frame counters

> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Tuesday, March 5, 2024 1:35 PM
> To: David Thompson <davthompson@...dia.com>
> Cc: davem@...emloft.net; edumazet@...gle.com; pabeni@...hat.com;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org; Asmaa Mnebhi
> <asmaa@...dia.com>
> Subject: Re: [PATCH net-next v1] mlxbf_gige: add support to display pause frame
> counters
> 
> On Tue, 5 Mar 2024 10:18:51 -0500 David Thompson wrote:
> > +	/* Read LLU counters only if they are enabled */
> > +	if (mlxbf_gige_llu_counters_enabled(priv)) {
> > +		data_lo = readl(priv->llu_base +
> MLXBF_GIGE_TX_PAUSE_CNT_LO);
> > +		data_hi = readl(priv->llu_base +
> MLXBF_GIGE_TX_PAUSE_CNT_HI);
> > +		pause_stats->tx_pause_frames = (data_hi << 32) | data_lo;
> > +
> > +		data_lo = readl(priv->llu_base +
> MLXBF_GIGE_RX_PAUSE_CNT_LO);
> > +		data_hi = readl(priv->llu_base +
> MLXBF_GIGE_RX_PAUSE_CNT_HI);
> > +		pause_stats->rx_pause_frames = (data_hi << 32) | data_lo;
> > +	} else {
> > +		pause_stats->tx_pause_frames = 0;
> > +		pause_stats->rx_pause_frames = 0;
> 
> Counters are not enabled, meaning we don't know how many frames were sent?
> Or pause frames are not enabled, therefore we know it's 0?
> 
> If the latter we should add a comment clarifying that, if the former:
> 
>  * @get_pause_stats: Report pause frame statistics. Drivers must not zero
>  *	statistics which they don't report. The stats structure is initialized
>  *	to ETHTOOL_STAT_NOT_SET indicating driver does not report statistics.
> --
> pw-bot: cr

Hi Jakub, thank you for your comments.

In this case it's the former, so pause frames are enabled we just don't know how
many are sent or received.  I will update the driver patch accordingly and send v2.

Regards, Dave

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ